var sE=t=>{throw TypeError(t)};var y0=(t,e,n)=>e.has(t)||sE("Cannot "+n);var pe=(t,e,n)=>(y0(t,e,"read from private field"),n?n.call(t):e.get(t)),Wt=(t,e,n)=>e.has(t)?sE("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),_t=(t,e,n,i)=>(y0(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),vi=(t,e,n)=>(y0(t,e,"access private method"),n);var um=(t,e,n,i)=>({set _(r){_t(t,e,r,n)},get _(){return pe(t,e,i)}});function q4(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function P_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var SR={exports:{}},Qx={},AR={exports:{}},Lt={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Vf=Symbol.for("react.element"),X4=Symbol.for("react.portal"),$4=Symbol.for("react.fragment"),Y4=Symbol.for("react.strict_mode"),Q4=Symbol.for("react.profiler"),K4=Symbol.for("react.provider"),Z4=Symbol.for("react.context"),J4=Symbol.for("react.forward_ref"),e5=Symbol.for("react.suspense"),t5=Symbol.for("react.memo"),n5=Symbol.for("react.lazy"),aE=Symbol.iterator;function i5(t){return t===null||typeof t!="object"?null:(t=aE&&t[aE]||t["@@iterator"],typeof t=="function"?t:null)}var MR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},TR=Object.assign,ER={};function od(t,e,n){this.props=t,this.context=e,this.refs=ER,this.updater=n||MR}od.prototype.isReactComponent={};od.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};od.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function CR(){}CR.prototype=od.prototype;function N_(t,e,n){this.props=t,this.context=e,this.refs=ER,this.updater=n||MR}var R_=N_.prototype=new CR;R_.constructor=N_;TR(R_,od.prototype);R_.isPureReactComponent=!0;var oE=Array.isArray,PR=Object.prototype.hasOwnProperty,I_={current:null},NR={key:!0,ref:!0,__self:!0,__source:!0};function RR(t,e,n){var i,r={},s=null,a=null;if(e!=null)for(i in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(s=""+e.key),e)PR.call(e,i)&&!NR.hasOwnProperty(i)&&(r[i]=e[i]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];r.children=c}if(t&&t.defaultProps)for(i in o=t.defaultProps,o)r[i]===void 0&&(r[i]=o[i]);return{$$typeof:Vf,type:t,key:s,ref:a,props:r,_owner:I_.current}}function r5(t,e){return{$$typeof:Vf,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function k_(t){return typeof t=="object"&&t!==null&&t.$$typeof===Vf}function s5(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var lE=/\/+/g;function v0(t,e){return typeof t=="object"&&t!==null&&t.key!=null?s5(""+t.key):e.toString(36)}function Ig(t,e,n,i,r){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case Vf:case X4:a=!0}}if(a)return a=t,r=r(a),t=i===""?"."+v0(a,0):i,oE(r)?(n="",t!=null&&(n=t.replace(lE,"$&/")+"/"),Ig(r,e,n,"",function(u){return u})):r!=null&&(k_(r)&&(r=r5(r,n+(!r.key||a&&a.key===r.key?"":(""+r.key).replace(lE,"$&/")+"/")+t)),e.push(r)),1;if(a=0,i=i===""?".":i+":",oE(t))for(var o=0;o<t.length;o++){s=t[o];var c=i+v0(s,o);a+=Ig(s,e,n,c,r)}else if(c=i5(t),typeof c=="function")for(t=c.call(t),o=0;!(s=t.next()).done;)s=s.value,c=i+v0(s,o++),a+=Ig(s,e,n,c,r);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function dm(t,e,n){if(t==null)return t;var i=[],r=0;return Ig(t,i,"","",function(s){return e.call(n,s,r++)}),i}function a5(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Wi={current:null},kg={transition:null},o5={ReactCurrentDispatcher:Wi,ReactCurrentBatchConfig:kg,ReactCurrentOwner:I_};function IR(){throw Error("act(...) is not supported in production builds of React.")}Lt.Children={map:dm,forEach:function(t,e,n){dm(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return dm(t,function(){e++}),e},toArray:function(t){return dm(t,function(e){return e})||[]},only:function(t){if(!k_(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Lt.Component=od;Lt.Fragment=$4;Lt.Profiler=Q4;Lt.PureComponent=N_;Lt.StrictMode=Y4;Lt.Suspense=e5;Lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=o5;Lt.act=IR;Lt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=TR({},t.props),r=t.key,s=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,a=I_.current),e.key!==void 0&&(r=""+e.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(c in e)PR.call(e,c)&&!NR.hasOwnProperty(c)&&(i[c]=e[c]===void 0&&o!==void 0?o[c]:e[c])}var c=arguments.length-2;if(c===1)i.children=n;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];i.children=o}return{$$typeof:Vf,type:t.type,key:r,ref:s,props:i,_owner:a}};Lt.createContext=function(t){return t={$$typeof:Z4,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:K4,_context:t},t.Consumer=t};Lt.createElement=RR;Lt.createFactory=function(t){var e=RR.bind(null,t);return e.type=t,e};Lt.createRef=function(){return{current:null}};Lt.forwardRef=function(t){return{$$typeof:J4,render:t}};Lt.isValidElement=k_;Lt.lazy=function(t){return{$$typeof:n5,_payload:{_status:-1,_result:t},_init:a5}};Lt.memo=function(t,e){return{$$typeof:t5,type:t,compare:e===void 0?null:e}};Lt.startTransition=function(t){var e=kg.transition;kg.transition={};try{t()}finally{kg.transition=e}};Lt.unstable_act=IR;Lt.useCallback=function(t,e){return Wi.current.useCallback(t,e)};Lt.useContext=function(t){return Wi.current.useContext(t)};Lt.useDebugValue=function(){};Lt.useDeferredValue=function(t){return Wi.current.useDeferredValue(t)};Lt.useEffect=function(t,e){return Wi.current.useEffect(t,e)};Lt.useId=function(){return Wi.current.useId()};Lt.useImperativeHandle=function(t,e,n){return Wi.current.useImperativeHandle(t,e,n)};Lt.useInsertionEffect=function(t,e){return Wi.current.useInsertionEffect(t,e)};Lt.useLayoutEffect=function(t,e){return Wi.current.useLayoutEffect(t,e)};Lt.useMemo=function(t,e){return Wi.current.useMemo(t,e)};Lt.useReducer=function(t,e,n){return Wi.current.useReducer(t,e,n)};Lt.useRef=function(t){return Wi.current.useRef(t)};Lt.useState=function(t){return Wi.current.useState(t)};Lt.useSyncExternalStore=function(t,e,n){return Wi.current.useSyncExternalStore(t,e,n)};Lt.useTransition=function(){return Wi.current.useTransition()};Lt.version="18.3.1";AR.exports=Lt;var I=AR.exports;const Ae=P_(I),L_=q4({__proto__:null,default:Ae},[I]);/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var l5=I,c5=Symbol.for("react.element"),u5=Symbol.for("react.fragment"),d5=Object.prototype.hasOwnProperty,h5=l5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f5={key:!0,ref:!0,__self:!0,__source:!0};function kR(t,e,n){var i,r={},s=null,a=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(a=e.ref);for(i in e)d5.call(e,i)&&!f5.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:c5,type:t,key:s,ref:a,props:r,_owner:h5.current}}Qx.Fragment=u5;Qx.jsx=kR;Qx.jsxs=kR;SR.exports=Qx;var l=SR.exports,LR={exports:{}},Tr={},DR={exports:{}},FR={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(t){function e(L,j){var B=L.length;L.push(j);e:for(;0<B;){var Y=B-1>>>1,Z=L[Y];if(0<r(Z,j))L[Y]=j,L[B]=Z,B=Y;else break e}}function n(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var j=L[0],B=L.pop();if(B!==j){L[0]=B;e:for(var Y=0,Z=L.length,K=Z>>>1;Y<K;){var se=2*(Y+1)-1,ge=L[se],Ce=se+1,xe=L[Ce];if(0>r(ge,B))Ce<Z&&0>r(xe,ge)?(L[Y]=xe,L[Ce]=B,Y=Ce):(L[Y]=ge,L[se]=B,Y=se);else if(Ce<Z&&0>r(xe,B))L[Y]=xe,L[Ce]=B,Y=Ce;else break e}}return j}function r(L,j){var B=L.sortIndex-j.sortIndex;return B!==0?B:L.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var c=[],u=[],f=1,p=null,m=3,g=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(L){for(var j=n(u);j!==null;){if(j.callback===null)i(u);else if(j.startTime<=L)i(u),j.sortIndex=j.expirationTime,e(c,j);else break;j=n(u)}}function M(L){if(b=!1,S(L),!y)if(n(c)!==null)y=!0,X(E);else{var j=n(u);j!==null&&ee(M,j.startTime-L)}}function E(L,j){y=!1,b&&(b=!1,x(D),D=-1),g=!0;var B=m;try{for(S(j),p=n(c);p!==null&&(!(p.expirationTime>j)||L&&!V());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,m=p.priorityLevel;var Z=Y(p.expirationTime<=j);j=t.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(c)&&i(c),S(j)}else i(c);p=n(c)}if(p!==null)var K=!0;else{var se=n(u);se!==null&&ee(M,se.startTime-j),K=!1}return K}finally{p=null,m=B,g=!1}}var C=!1,N=null,D=-1,R=5,k=-1;function V(){return!(t.unstable_now()-k<R)}function G(){if(N!==null){var L=t.unstable_now();k=L;var j=!0;try{j=N(!0,L)}finally{j?ie():(C=!1,N=null)}}else C=!1}var ie;if(typeof _=="function")ie=function(){_(G)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,$=z.port2;z.port1.onmessage=G,ie=function(){$.postMessage(null)}}else ie=function(){w(G,0)};function X(L){N=L,C||(C=!0,ie())}function ee(L,j){D=w(function(){L(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){y||g||(y=!0,X(E))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(L){switch(m){case 1:case 2:case 3:var j=3;break;default:j=m}var B=m;m=j;try{return L()}finally{m=B}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,j){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var B=m;m=L;try{return j()}finally{m=B}},t.unstable_scheduleCallback=function(L,j,B){var Y=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Y+B:Y):B=Y,L){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=B+Z,L={id:f++,callback:j,priorityLevel:L,startTime:B,expirationTime:Z,sortIndex:-1},B>Y?(L.sortIndex=B,e(u,L),n(c)===null&&L===n(u)&&(b?(x(D),D=-1):b=!0,ee(M,B-Y))):(L.sortIndex=Z,e(c,L),y||g||(y=!0,X(E))),L},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(L){var j=m;return function(){var B=m;m=j;try{return L.apply(this,arguments)}finally{m=B}}}})(FR);DR.exports=FR;var p5=DR.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var m5=I,Sr=p5;function Ee(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jR=new Set,Bh={};function oc(t,e){Hu(t,e),Hu(t+"Capture",e)}function Hu(t,e){for(Bh[t]=e,t=0;t<e.length;t++)jR.add(e[t])}var Ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),db=Object.prototype.hasOwnProperty,g5=/^[: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]*$/,cE={},uE={};function x5(t){return db.call(uE,t)?!0:db.call(cE,t)?!1:g5.test(t)?uE[t]=!0:(cE[t]=!0,!1)}function y5(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function v5(t,e,n,i){if(e===null||typeof e>"u"||y5(t,e,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Gi(t,e,n,i,r,s,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}var pi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){pi[t]=new Gi(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];pi[e]=new Gi(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){pi[t]=new Gi(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){pi[t]=new Gi(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){pi[t]=new Gi(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){pi[t]=new Gi(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){pi[t]=new Gi(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){pi[t]=new Gi(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){pi[t]=new Gi(t,5,!1,t.toLowerCase(),null,!1,!1)});var D_=/[\-:]([a-z])/g;function F_(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(D_,F_);pi[e]=new Gi(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(D_,F_);pi[e]=new Gi(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(D_,F_);pi[e]=new Gi(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){pi[t]=new Gi(t,1,!1,t.toLowerCase(),null,!1,!1)});pi.xlinkHref=new Gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){pi[t]=new Gi(t,1,!1,t.toLowerCase(),null,!0,!0)});function j_(t,e,n,i){var r=pi.hasOwnProperty(e)?pi[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(v5(e,n,r,i)&&(n=null),i||r===null?x5(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=n===null?r.type===3?!1:"":n:(e=r.attributeName,i=r.attributeNamespace,n===null?t.removeAttribute(e):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}var Fa=m5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hm=Symbol.for("react.element"),iu=Symbol.for("react.portal"),ru=Symbol.for("react.fragment"),O_=Symbol.for("react.strict_mode"),hb=Symbol.for("react.profiler"),OR=Symbol.for("react.provider"),UR=Symbol.for("react.context"),U_=Symbol.for("react.forward_ref"),fb=Symbol.for("react.suspense"),pb=Symbol.for("react.suspense_list"),z_=Symbol.for("react.memo"),ao=Symbol.for("react.lazy"),zR=Symbol.for("react.offscreen"),dE=Symbol.iterator;function Hd(t){return t===null||typeof t!="object"?null:(t=dE&&t[dE]||t["@@iterator"],typeof t=="function"?t:null)}var _n=Object.assign,w0;function fh(t){if(w0===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);w0=e&&e[1]||""}return`
`+w0+t}var b0=!1;function _0(t,e){if(!t||b0)return"";b0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var i=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){i=u}t.call(e.prototype)}else{try{throw Error()}catch(u){i=u}t()}}catch(u){if(u&&i&&typeof u.stack=="string"){for(var r=u.stack.split(`
`),s=i.stack.split(`
`),a=r.length-1,o=s.length-1;1<=a&&0<=o&&r[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(r[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||r[a]!==s[o]){var c=`
`+r[a].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=a&&0<=o);break}}}finally{b0=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?fh(t):""}function w5(t){switch(t.tag){case 5:return fh(t.type);case 16:return fh("Lazy");case 13:return fh("Suspense");case 19:return fh("SuspenseList");case 0:case 2:case 15:return t=_0(t.type,!1),t;case 11:return t=_0(t.type.render,!1),t;case 1:return t=_0(t.type,!0),t;default:return""}}function mb(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case ru:return"Fragment";case iu:return"Portal";case hb:return"Profiler";case O_:return"StrictMode";case fb:return"Suspense";case pb:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case UR:return(t.displayName||"Context")+".Consumer";case OR:return(t._context.displayName||"Context")+".Provider";case U_:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z_:return e=t.displayName||null,e!==null?e:mb(t.type)||"Memo";case ao:e=t._payload,t=t._init;try{return mb(t(e))}catch{}}return null}function b5(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mb(e);case 8:return e===O_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ko(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function BR(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function _5(t){var e=BR(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(a){i=""+a,s.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(a){i=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function fm(t){t._valueTracker||(t._valueTracker=_5(t))}function VR(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=BR(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function rx(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function gb(t,e){var n=e.checked;return _n({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function hE(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=ko(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function HR(t,e){e=e.checked,e!=null&&j_(t,"checked",e,!1)}function xb(t,e){HR(t,e);var n=ko(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?yb(t,e.type,n):e.hasOwnProperty("defaultValue")&&yb(t,e.type,ko(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function fE(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function yb(t,e,n){(e!=="number"||rx(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var ph=Array.isArray;function Tu(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+ko(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,i&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function vb(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Ee(91));return _n({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function pE(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Ee(92));if(ph(n)){if(1<n.length)throw Error(Ee(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:ko(n)}}function WR(t,e){var n=ko(e.value),i=ko(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),i!=null&&(t.defaultValue=""+i)}function mE(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function GR(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wb(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?GR(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var pm,qR=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,i,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,r)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(pm=pm||document.createElement("div"),pm.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=pm.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Vh(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var bh={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},S5=["Webkit","ms","Moz","O"];Object.keys(bh).forEach(function(t){S5.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),bh[e]=bh[t]})});function XR(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||bh.hasOwnProperty(t)&&bh[t]?(""+e).trim():e+"px"}function $R(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=XR(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var A5=_n({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 bb(t,e){if(e){if(A5[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ee(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ee(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ee(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ee(62))}}function _b(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Sb=null;function B_(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ab=null,Eu=null,Cu=null;function gE(t){if(t=Gf(t)){if(typeof Ab!="function")throw Error(Ee(280));var e=t.stateNode;e&&(e=ty(e),Ab(t.stateNode,t.type,e))}}function YR(t){Eu?Cu?Cu.push(t):Cu=[t]:Eu=t}function QR(){if(Eu){var t=Eu,e=Cu;if(Cu=Eu=null,gE(t),e)for(t=0;t<e.length;t++)gE(e[t])}}function KR(t,e){return t(e)}function ZR(){}var S0=!1;function JR(t,e,n){if(S0)return t(e,n);S0=!0;try{return KR(t,e,n)}finally{S0=!1,(Eu!==null||Cu!==null)&&(ZR(),QR())}}function Hh(t,e){var n=t.stateNode;if(n===null)return null;var i=ty(n);if(i===null)return null;n=i[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Ee(231,e,typeof n));return n}var Mb=!1;if(Ta)try{var Wd={};Object.defineProperty(Wd,"passive",{get:function(){Mb=!0}}),window.addEventListener("test",Wd,Wd),window.removeEventListener("test",Wd,Wd)}catch{Mb=!1}function M5(t,e,n,i,r,s,a,o,c){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(f){this.onError(f)}}var _h=!1,sx=null,ax=!1,Tb=null,T5={onError:function(t){_h=!0,sx=t}};function E5(t,e,n,i,r,s,a,o,c){_h=!1,sx=null,M5.apply(T5,arguments)}function C5(t,e,n,i,r,s,a,o,c){if(E5.apply(this,arguments),_h){if(_h){var u=sx;_h=!1,sx=null}else throw Error(Ee(198));ax||(ax=!0,Tb=u)}}function lc(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function eI(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function xE(t){if(lc(t)!==t)throw Error(Ee(188))}function P5(t){var e=t.alternate;if(!e){if(e=lc(t),e===null)throw Error(Ee(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return xE(r),t;if(s===i)return xE(r),e;s=s.sibling}throw Error(Ee(188))}if(n.return!==i.return)n=r,i=s;else{for(var a=!1,o=r.child;o;){if(o===n){a=!0,n=r,i=s;break}if(o===i){a=!0,i=r,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,i=r;break}if(o===i){a=!0,i=s,n=r;break}o=o.sibling}if(!a)throw Error(Ee(189))}}if(n.alternate!==i)throw Error(Ee(190))}if(n.tag!==3)throw Error(Ee(188));return n.stateNode.current===n?t:e}function tI(t){return t=P5(t),t!==null?nI(t):null}function nI(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=nI(t);if(e!==null)return e;t=t.sibling}return null}var iI=Sr.unstable_scheduleCallback,yE=Sr.unstable_cancelCallback,N5=Sr.unstable_shouldYield,R5=Sr.unstable_requestPaint,Dn=Sr.unstable_now,I5=Sr.unstable_getCurrentPriorityLevel,V_=Sr.unstable_ImmediatePriority,rI=Sr.unstable_UserBlockingPriority,ox=Sr.unstable_NormalPriority,k5=Sr.unstable_LowPriority,sI=Sr.unstable_IdlePriority,Kx=null,Us=null;function L5(t){if(Us&&typeof Us.onCommitFiberRoot=="function")try{Us.onCommitFiberRoot(Kx,t,void 0,(t.current.flags&128)===128)}catch{}}var fs=Math.clz32?Math.clz32:j5,D5=Math.log,F5=Math.LN2;function j5(t){return t>>>=0,t===0?32:31-(D5(t)/F5|0)|0}var mm=64,gm=4194304;function mh(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function lx(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,a=n&268435455;if(a!==0){var o=a&~r;o!==0?i=mh(o):(s&=a,s!==0&&(i=mh(s)))}else a=n&~r,a!==0?i=mh(a):s!==0&&(i=mh(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0<e;)n=31-fs(e),r=1<<n,i|=t[n],e&=~r;return i}function O5(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function U5(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var a=31-fs(s),o=1<<a,c=r[a];c===-1?(!(o&n)||o&i)&&(r[a]=O5(o,e)):c<=e&&(t.expiredLanes|=o),s&=~o}}function Eb(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function aI(){var t=mm;return mm<<=1,!(mm&4194240)&&(mm=64),t}function A0(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Hf(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-fs(e),t[e]=n}function z5(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-fs(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}function H_(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-fs(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var Qt=0;function oI(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var lI,W_,cI,uI,dI,Cb=!1,xm=[],bo=null,_o=null,So=null,Wh=new Map,Gh=new Map,co=[],B5="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 vE(t,e){switch(t){case"focusin":case"focusout":bo=null;break;case"dragenter":case"dragleave":_o=null;break;case"mouseover":case"mouseout":So=null;break;case"pointerover":case"pointerout":Wh.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gh.delete(e.pointerId)}}function Gd(t,e,n,i,r,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},e!==null&&(e=Gf(e),e!==null&&W_(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function V5(t,e,n,i,r){switch(e){case"focusin":return bo=Gd(bo,t,e,n,i,r),!0;case"dragenter":return _o=Gd(_o,t,e,n,i,r),!0;case"mouseover":return So=Gd(So,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return Wh.set(s,Gd(Wh.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,Gh.set(s,Gd(Gh.get(s)||null,t,e,n,i,r)),!0}return!1}function hI(t){var e=Tl(t.target);if(e!==null){var n=lc(e);if(n!==null){if(e=n.tag,e===13){if(e=eI(n),e!==null){t.blockedOn=e,dI(t.priority,function(){cI(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Lg(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Pb(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);Sb=i,n.target.dispatchEvent(i),Sb=null}else return e=Gf(n),e!==null&&W_(e),t.blockedOn=n,!1;e.shift()}return!0}function wE(t,e,n){Lg(t)&&n.delete(e)}function H5(){Cb=!1,bo!==null&&Lg(bo)&&(bo=null),_o!==null&&Lg(_o)&&(_o=null),So!==null&&Lg(So)&&(So=null),Wh.forEach(wE),Gh.forEach(wE)}function qd(t,e){t.blockedOn===e&&(t.blockedOn=null,Cb||(Cb=!0,Sr.unstable_scheduleCallback(Sr.unstable_NormalPriority,H5)))}function qh(t){function e(r){return qd(r,t)}if(0<xm.length){qd(xm[0],t);for(var n=1;n<xm.length;n++){var i=xm[n];i.blockedOn===t&&(i.blockedOn=null)}}for(bo!==null&&qd(bo,t),_o!==null&&qd(_o,t),So!==null&&qd(So,t),Wh.forEach(e),Gh.forEach(e),n=0;n<co.length;n++)i=co[n],i.blockedOn===t&&(i.blockedOn=null);for(;0<co.length&&(n=co[0],n.blockedOn===null);)hI(n),n.blockedOn===null&&co.shift()}var Pu=Fa.ReactCurrentBatchConfig,cx=!0;function W5(t,e,n,i){var r=Qt,s=Pu.transition;Pu.transition=null;try{Qt=1,G_(t,e,n,i)}finally{Qt=r,Pu.transition=s}}function G5(t,e,n,i){var r=Qt,s=Pu.transition;Pu.transition=null;try{Qt=4,G_(t,e,n,i)}finally{Qt=r,Pu.transition=s}}function G_(t,e,n,i){if(cx){var r=Pb(t,e,n,i);if(r===null)L0(t,e,i,ux,n),vE(t,i);else if(V5(r,t,e,n,i))i.stopPropagation();else if(vE(t,i),e&4&&-1<B5.indexOf(t)){for(;r!==null;){var s=Gf(r);if(s!==null&&lI(s),s=Pb(t,e,n,i),s===null&&L0(t,e,i,ux,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else L0(t,e,i,null,n)}}var ux=null;function Pb(t,e,n,i){if(ux=null,t=B_(i),t=Tl(t),t!==null)if(e=lc(t),e===null)t=null;else if(n=e.tag,n===13){if(t=eI(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return ux=t,null}function fI(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(I5()){case V_:return 1;case rI:return 4;case ox:case k5:return 16;case sI:return 536870912;default:return 16}default:return 16}}var yo=null,q_=null,Dg=null;function pI(){if(Dg)return Dg;var t,e=q_,n=e.length,i,r="value"in yo?yo.value:yo.textContent,s=r.length;for(t=0;t<n&&e[t]===r[t];t++);var a=n-t;for(i=1;i<=a&&e[n-i]===r[s-i];i++);return Dg=r.slice(t,1<i?1-i:void 0)}function Fg(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function ym(){return!0}function bE(){return!1}function Er(t){function e(n,i,r,s,a){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?ym:bE,this.isPropagationStopped=bE,this}return _n(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ym)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ym)},persist:function(){},isPersistent:ym}),e}var ld={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},X_=Er(ld),Wf=_n({},ld,{view:0,detail:0}),q5=Er(Wf),M0,T0,Xd,Zx=_n({},Wf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$_,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Xd&&(Xd&&t.type==="mousemove"?(M0=t.screenX-Xd.screenX,T0=t.screenY-Xd.screenY):T0=M0=0,Xd=t),M0)},movementY:function(t){return"movementY"in t?t.movementY:T0}}),_E=Er(Zx),X5=_n({},Zx,{dataTransfer:0}),$5=Er(X5),Y5=_n({},Wf,{relatedTarget:0}),E0=Er(Y5),Q5=_n({},ld,{animationName:0,elapsedTime:0,pseudoElement:0}),K5=Er(Q5),Z5=_n({},ld,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),J5=Er(Z5),eU=_n({},ld,{data:0}),SE=Er(eU),tU={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nU={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"},iU={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rU(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=iU[t])?!!e[t]:!1}function $_(){return rU}var sU=_n({},Wf,{key:function(t){if(t.key){var e=tU[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Fg(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?nU[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$_,charCode:function(t){return t.type==="keypress"?Fg(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Fg(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),aU=Er(sU),oU=_n({},Zx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),AE=Er(oU),lU=_n({},Wf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$_}),cU=Er(lU),uU=_n({},ld,{propertyName:0,elapsedTime:0,pseudoElement:0}),dU=Er(uU),hU=_n({},Zx,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),fU=Er(hU),pU=[9,13,27,32],Y_=Ta&&"CompositionEvent"in window,Sh=null;Ta&&"documentMode"in document&&(Sh=document.documentMode);var mU=Ta&&"TextEvent"in window&&!Sh,mI=Ta&&(!Y_||Sh&&8<Sh&&11>=Sh),ME=" ",TE=!1;function gI(t,e){switch(t){case"keyup":return pU.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xI(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var su=!1;function gU(t,e){switch(t){case"compositionend":return xI(e);case"keypress":return e.which!==32?null:(TE=!0,ME);case"textInput":return t=e.data,t===ME&&TE?null:t;default:return null}}function xU(t,e){if(su)return t==="compositionend"||!Y_&&gI(t,e)?(t=pI(),Dg=q_=yo=null,su=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return mI&&e.locale!=="ko"?null:e.data;default:return null}}var yU={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 EE(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!yU[t.type]:e==="textarea"}function yI(t,e,n,i){YR(i),e=dx(e,"onChange"),0<e.length&&(n=new X_("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var Ah=null,Xh=null;function vU(t){PI(t,0)}function Jx(t){var e=lu(t);if(VR(e))return t}function wU(t,e){if(t==="change")return e}var vI=!1;if(Ta){var C0;if(Ta){var P0="oninput"in document;if(!P0){var CE=document.createElement("div");CE.setAttribute("oninput","return;"),P0=typeof CE.oninput=="function"}C0=P0}else C0=!1;vI=C0&&(!document.documentMode||9<document.documentMode)}function PE(){Ah&&(Ah.detachEvent("onpropertychange",wI),Xh=Ah=null)}function wI(t){if(t.propertyName==="value"&&Jx(Xh)){var e=[];yI(e,Xh,t,B_(t)),JR(vU,e)}}function bU(t,e,n){t==="focusin"?(PE(),Ah=e,Xh=n,Ah.attachEvent("onpropertychange",wI)):t==="focusout"&&PE()}function _U(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Jx(Xh)}function SU(t,e){if(t==="click")return Jx(e)}function AU(t,e){if(t==="input"||t==="change")return Jx(e)}function MU(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ms=typeof Object.is=="function"?Object.is:MU;function $h(t,e){if(ms(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!db.call(e,r)||!ms(t[r],e[r]))return!1}return!0}function NE(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function RE(t,e){var n=NE(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=NE(n)}}function bI(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?bI(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function _I(){for(var t=window,e=rx();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=rx(t.document)}return e}function Q_(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function TU(t){var e=_I(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&bI(n.ownerDocument.documentElement,n)){if(i!==null&&Q_(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=RE(n,s);var a=RE(n,i);r&&a&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var EU=Ta&&"documentMode"in document&&11>=document.documentMode,au=null,Nb=null,Mh=null,Rb=!1;function IE(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rb||au==null||au!==rx(i)||(i=au,"selectionStart"in i&&Q_(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Mh&&$h(Mh,i)||(Mh=i,i=dx(Nb,"onSelect"),0<i.length&&(e=new X_("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=au)))}function vm(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ou={animationend:vm("Animation","AnimationEnd"),animationiteration:vm("Animation","AnimationIteration"),animationstart:vm("Animation","AnimationStart"),transitionend:vm("Transition","TransitionEnd")},N0={},SI={};Ta&&(SI=document.createElement("div").style,"AnimationEvent"in window||(delete ou.animationend.animation,delete ou.animationiteration.animation,delete ou.animationstart.animation),"TransitionEvent"in window||delete ou.transitionend.transition);function ey(t){if(N0[t])return N0[t];if(!ou[t])return t;var e=ou[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in SI)return N0[t]=e[n];return t}var AI=ey("animationend"),MI=ey("animationiteration"),TI=ey("animationstart"),EI=ey("transitionend"),CI=new Map,kE="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 Ho(t,e){CI.set(t,e),oc(e,[t])}for(var R0=0;R0<kE.length;R0++){var I0=kE[R0],CU=I0.toLowerCase(),PU=I0[0].toUpperCase()+I0.slice(1);Ho(CU,"on"+PU)}Ho(AI,"onAnimationEnd");Ho(MI,"onAnimationIteration");Ho(TI,"onAnimationStart");Ho("dblclick","onDoubleClick");Ho("focusin","onFocus");Ho("focusout","onBlur");Ho(EI,"onTransitionEnd");Hu("onMouseEnter",["mouseout","mouseover"]);Hu("onMouseLeave",["mouseout","mouseover"]);Hu("onPointerEnter",["pointerout","pointerover"]);Hu("onPointerLeave",["pointerout","pointerover"]);oc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));oc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));oc("onBeforeInput",["compositionend","keypress","textInput","paste"]);oc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));oc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));oc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gh="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(" "),NU=new Set("cancel close invalid load scroll toggle".split(" ").concat(gh));function LE(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,C5(i,e,void 0,t),t.currentTarget=null}function PI(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],r=i.event;i=i.listeners;e:{var s=void 0;if(e)for(var a=i.length-1;0<=a;a--){var o=i[a],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==s&&r.isPropagationStopped())break e;LE(r,o,u),s=c}else for(a=0;a<i.length;a++){if(o=i[a],c=o.instance,u=o.currentTarget,o=o.listener,c!==s&&r.isPropagationStopped())break e;LE(r,o,u),s=c}}}if(ax)throw t=Tb,ax=!1,Tb=null,t}function an(t,e){var n=e[Fb];n===void 0&&(n=e[Fb]=new Set);var i=t+"__bubble";n.has(i)||(NI(e,t,2,!1),n.add(i))}function k0(t,e,n){var i=0;e&&(i|=4),NI(n,t,i,e)}var wm="_reactListening"+Math.random().toString(36).slice(2);function Yh(t){if(!t[wm]){t[wm]=!0,jR.forEach(function(n){n!=="selectionchange"&&(NU.has(n)||k0(n,!1,t),k0(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[wm]||(e[wm]=!0,k0("selectionchange",!1,e))}}function NI(t,e,n,i){switch(fI(e)){case 1:var r=W5;break;case 4:r=G5;break;default:r=G_}n=r.bind(null,e,n,t),r=void 0,!Mb||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),i?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function L0(t,e,n,i,r){var s=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var a=i.tag;if(a===3||a===4){var o=i.stateNode.containerInfo;if(o===r||o.nodeType===8&&o.parentNode===r)break;if(a===4)for(a=i.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===r||c.nodeType===8&&c.parentNode===r))return;a=a.return}for(;o!==null;){if(a=Tl(o),a===null)return;if(c=a.tag,c===5||c===6){i=s=a;continue e}o=o.parentNode}}i=i.return}JR(function(){var u=s,f=B_(n),p=[];e:{var m=CI.get(t);if(m!==void 0){var g=X_,y=t;switch(t){case"keypress":if(Fg(n)===0)break e;case"keydown":case"keyup":g=aU;break;case"focusin":y="focus",g=E0;break;case"focusout":y="blur",g=E0;break;case"beforeblur":case"afterblur":g=E0;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":g=_E;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=$5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=cU;break;case AI:case MI:case TI:g=K5;break;case EI:g=dU;break;case"scroll":g=q5;break;case"wheel":g=fU;break;case"copy":case"cut":case"paste":g=J5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=AE}var b=(e&4)!==0,w=!b&&t==="scroll",x=b?m!==null?m+"Capture":null:m;b=[];for(var _=u,S;_!==null;){S=_;var M=S.stateNode;if(S.tag===5&&M!==null&&(S=M,x!==null&&(M=Hh(_,x),M!=null&&b.push(Qh(_,M,S)))),w)break;_=_.return}0<b.length&&(m=new g(m,y,null,n,f),p.push({event:m,listeners:b}))}}if(!(e&7)){e:{if(m=t==="mouseover"||t==="pointerover",g=t==="mouseout"||t==="pointerout",m&&n!==Sb&&(y=n.relatedTarget||n.fromElement)&&(Tl(y)||y[Ea]))break e;if((g||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,g?(y=n.relatedTarget||n.toElement,g=u,y=y?Tl(y):null,y!==null&&(w=lc(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(g=null,y=u),g!==y)){if(b=_E,M="onMouseLeave",x="onMouseEnter",_="mouse",(t==="pointerout"||t==="pointerover")&&(b=AE,M="onPointerLeave",x="onPointerEnter",_="pointer"),w=g==null?m:lu(g),S=y==null?m:lu(y),m=new b(M,_+"leave",g,n,f),m.target=w,m.relatedTarget=S,M=null,Tl(f)===u&&(b=new b(x,_+"enter",y,n,f),b.target=S,b.relatedTarget=w,M=b),w=M,g&&y)t:{for(b=g,x=y,_=0,S=b;S;S=Rc(S))_++;for(S=0,M=x;M;M=Rc(M))S++;for(;0<_-S;)b=Rc(b),_--;for(;0<S-_;)x=Rc(x),S--;for(;_--;){if(b===x||x!==null&&b===x.alternate)break t;b=Rc(b),x=Rc(x)}b=null}else b=null;g!==null&&DE(p,m,g,b,!1),y!==null&&w!==null&&DE(p,w,y,b,!0)}}e:{if(m=u?lu(u):window,g=m.nodeName&&m.nodeName.toLowerCase(),g==="select"||g==="input"&&m.type==="file")var E=wU;else if(EE(m))if(vI)E=AU;else{E=_U;var C=bU}else(g=m.nodeName)&&g.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(E=SU);if(E&&(E=E(t,u))){yI(p,E,n,f);break e}C&&C(t,m,u),t==="focusout"&&(C=m._wrapperState)&&C.controlled&&m.type==="number"&&yb(m,"number",m.value)}switch(C=u?lu(u):window,t){case"focusin":(EE(C)||C.contentEditable==="true")&&(au=C,Nb=u,Mh=null);break;case"focusout":Mh=Nb=au=null;break;case"mousedown":Rb=!0;break;case"contextmenu":case"mouseup":case"dragend":Rb=!1,IE(p,n,f);break;case"selectionchange":if(EU)break;case"keydown":case"keyup":IE(p,n,f)}var N;if(Y_)e:{switch(t){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else su?gI(t,n)&&(D="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(mI&&n.locale!=="ko"&&(su||D!=="onCompositionStart"?D==="onCompositionEnd"&&su&&(N=pI()):(yo=f,q_="value"in yo?yo.value:yo.textContent,su=!0)),C=dx(u,D),0<C.length&&(D=new SE(D,t,null,n,f),p.push({event:D,listeners:C}),N?D.data=N:(N=xI(n),N!==null&&(D.data=N)))),(N=mU?gU(t,n):xU(t,n))&&(u=dx(u,"onBeforeInput"),0<u.length&&(f=new SE("onBeforeInput","beforeinput",null,n,f),p.push({event:f,listeners:u}),f.data=N))}PI(p,e)})}function Qh(t,e,n){return{instance:t,listener:e,currentTarget:n}}function dx(t,e){for(var n=e+"Capture",i=[];t!==null;){var r=t,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=Hh(t,n),s!=null&&i.unshift(Qh(t,s,r)),s=Hh(t,e),s!=null&&i.push(Qh(t,s,r))),t=t.return}return i}function Rc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function DE(t,e,n,i,r){for(var s=e._reactName,a=[];n!==null&&n!==i;){var o=n,c=o.alternate,u=o.stateNode;if(c!==null&&c===i)break;o.tag===5&&u!==null&&(o=u,r?(c=Hh(n,s),c!=null&&a.unshift(Qh(n,c,o))):r||(c=Hh(n,s),c!=null&&a.push(Qh(n,c,o)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var RU=/\r\n?/g,IU=/\u0000|\uFFFD/g;function FE(t){return(typeof t=="string"?t:""+t).replace(RU,`
`).replace(IU,"")}function bm(t,e,n){if(e=FE(e),FE(t)!==e&&n)throw Error(Ee(425))}function hx(){}var Ib=null,kb=null;function Lb(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Db=typeof setTimeout=="function"?setTimeout:void 0,kU=typeof clearTimeout=="function"?clearTimeout:void 0,jE=typeof Promise=="function"?Promise:void 0,LU=typeof queueMicrotask=="function"?queueMicrotask:typeof jE<"u"?function(t){return jE.resolve(null).then(t).catch(DU)}:Db;function DU(t){setTimeout(function(){throw t})}function D0(t,e){var n=e,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){t.removeChild(r),qh(e);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);qh(e)}function Ao(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function OE(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var cd=Math.random().toString(36).slice(2),Fs="__reactFiber$"+cd,Kh="__reactProps$"+cd,Ea="__reactContainer$"+cd,Fb="__reactEvents$"+cd,FU="__reactListeners$"+cd,jU="__reactHandles$"+cd;function Tl(t){var e=t[Fs];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ea]||n[Fs]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=OE(t);t!==null;){if(n=t[Fs])return n;t=OE(t)}return e}t=n,n=t.parentNode}return null}function Gf(t){return t=t[Fs]||t[Ea],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function lu(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Ee(33))}function ty(t){return t[Kh]||null}var jb=[],cu=-1;function Wo(t){return{current:t}}function ln(t){0>cu||(t.current=jb[cu],jb[cu]=null,cu--)}function tn(t,e){cu++,jb[cu]=t.current,t.current=e}var Lo={},Ri=Wo(Lo),ir=Wo(!1),Kl=Lo;function Wu(t,e){var n=t.type.contextTypes;if(!n)return Lo;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=e[s];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function rr(t){return t=t.childContextTypes,t!=null}function fx(){ln(ir),ln(Ri)}function UE(t,e,n){if(Ri.current!==Lo)throw Error(Ee(168));tn(Ri,e),tn(ir,n)}function RI(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Ee(108,b5(t)||"Unknown",r));return _n({},n,i)}function px(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Lo,Kl=Ri.current,tn(Ri,t),tn(ir,ir.current),!0}function zE(t,e,n){var i=t.stateNode;if(!i)throw Error(Ee(169));n?(t=RI(t,e,Kl),i.__reactInternalMemoizedMergedChildContext=t,ln(ir),ln(Ri),tn(Ri,t)):ln(ir),tn(ir,n)}var ma=null,ny=!1,F0=!1;function II(t){ma===null?ma=[t]:ma.push(t)}function OU(t){ny=!0,II(t)}function Go(){if(!F0&&ma!==null){F0=!0;var t=0,e=Qt;try{var n=ma;for(Qt=1;t<n.length;t++){var i=n[t];do i=i(!0);while(i!==null)}ma=null,ny=!1}catch(r){throw ma!==null&&(ma=ma.slice(t+1)),iI(V_,Go),r}finally{Qt=e,F0=!1}}return null}var uu=[],du=0,mx=null,gx=0,Vr=[],Hr=0,Zl=null,ya=1,va="";function vl(t,e){uu[du++]=gx,uu[du++]=mx,mx=t,gx=e}function kI(t,e,n){Vr[Hr++]=ya,Vr[Hr++]=va,Vr[Hr++]=Zl,Zl=t;var i=ya;t=va;var r=32-fs(i)-1;i&=~(1<<r),n+=1;var s=32-fs(e)+r;if(30<s){var a=r-r%5;s=(i&(1<<a)-1).toString(32),i>>=a,r-=a,ya=1<<32-fs(e)+r|n<<r|i,va=s+t}else ya=1<<s|n<<r|i,va=t}function K_(t){t.return!==null&&(vl(t,1),kI(t,1,0))}function Z_(t){for(;t===mx;)mx=uu[--du],uu[du]=null,gx=uu[--du],uu[du]=null;for(;t===Zl;)Zl=Vr[--Hr],Vr[Hr]=null,va=Vr[--Hr],Vr[Hr]=null,ya=Vr[--Hr],Vr[Hr]=null}var vr=null,yr=null,pn=!1,cs=null;function LI(t,e){var n=Wr(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function BE(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,vr=t,yr=Ao(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,vr=t,yr=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Zl!==null?{id:ya,overflow:va}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Wr(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,vr=t,yr=null,!0):!1;default:return!1}}function Ob(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Ub(t){if(pn){var e=yr;if(e){var n=e;if(!BE(t,e)){if(Ob(t))throw Error(Ee(418));e=Ao(n.nextSibling);var i=vr;e&&BE(t,e)?LI(i,n):(t.flags=t.flags&-4097|2,pn=!1,vr=t)}}else{if(Ob(t))throw Error(Ee(418));t.flags=t.flags&-4097|2,pn=!1,vr=t}}}function VE(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;vr=t}function _m(t){if(t!==vr)return!1;if(!pn)return VE(t),pn=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Lb(t.type,t.memoizedProps)),e&&(e=yr)){if(Ob(t))throw DI(),Error(Ee(418));for(;e;)LI(t,e),e=Ao(e.nextSibling)}if(VE(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Ee(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){yr=Ao(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}yr=null}}else yr=vr?Ao(t.stateNode.nextSibling):null;return!0}function DI(){for(var t=yr;t;)t=Ao(t.nextSibling)}function Gu(){yr=vr=null,pn=!1}function J_(t){cs===null?cs=[t]:cs.push(t)}var UU=Fa.ReactCurrentBatchConfig;function $d(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ee(309));var i=n.stateNode}if(!i)throw Error(Ee(147,t));var r=i,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(a){var o=r.refs;a===null?delete o[s]:o[s]=a},e._stringRef=s,e)}if(typeof t!="string")throw Error(Ee(284));if(!n._owner)throw Error(Ee(290,t))}return t}function Sm(t,e){throw t=Object.prototype.toString.call(e),Error(Ee(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function HE(t){var e=t._init;return e(t._payload)}function FI(t){function e(x,_){if(t){var S=x.deletions;S===null?(x.deletions=[_],x.flags|=16):S.push(_)}}function n(x,_){if(!t)return null;for(;_!==null;)e(x,_),_=_.sibling;return null}function i(x,_){for(x=new Map;_!==null;)_.key!==null?x.set(_.key,_):x.set(_.index,_),_=_.sibling;return x}function r(x,_){return x=Co(x,_),x.index=0,x.sibling=null,x}function s(x,_,S){return x.index=S,t?(S=x.alternate,S!==null?(S=S.index,S<_?(x.flags|=2,_):S):(x.flags|=2,_)):(x.flags|=1048576,_)}function a(x){return t&&x.alternate===null&&(x.flags|=2),x}function o(x,_,S,M){return _===null||_.tag!==6?(_=H0(S,x.mode,M),_.return=x,_):(_=r(_,S),_.return=x,_)}function c(x,_,S,M){var E=S.type;return E===ru?f(x,_,S.props.children,M,S.key):_!==null&&(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ao&&HE(E)===_.type)?(M=r(_,S.props),M.ref=$d(x,_,S),M.return=x,M):(M=Hg(S.type,S.key,S.props,null,x.mode,M),M.ref=$d(x,_,S),M.return=x,M)}function u(x,_,S,M){return _===null||_.tag!==4||_.stateNode.containerInfo!==S.containerInfo||_.stateNode.implementation!==S.implementation?(_=W0(S,x.mode,M),_.return=x,_):(_=r(_,S.children||[]),_.return=x,_)}function f(x,_,S,M,E){return _===null||_.tag!==7?(_=Bl(S,x.mode,M,E),_.return=x,_):(_=r(_,S),_.return=x,_)}function p(x,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return _=H0(""+_,x.mode,S),_.return=x,_;if(typeof _=="object"&&_!==null){switch(_.$$typeof){case hm:return S=Hg(_.type,_.key,_.props,null,x.mode,S),S.ref=$d(x,null,_),S.return=x,S;case iu:return _=W0(_,x.mode,S),_.return=x,_;case ao:var M=_._init;return p(x,M(_._payload),S)}if(ph(_)||Hd(_))return _=Bl(_,x.mode,S,null),_.return=x,_;Sm(x,_)}return null}function m(x,_,S,M){var E=_!==null?_.key:null;if(typeof S=="string"&&S!==""||typeof S=="number")return E!==null?null:o(x,_,""+S,M);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case hm:return S.key===E?c(x,_,S,M):null;case iu:return S.key===E?u(x,_,S,M):null;case ao:return E=S._init,m(x,_,E(S._payload),M)}if(ph(S)||Hd(S))return E!==null?null:f(x,_,S,M,null);Sm(x,S)}return null}function g(x,_,S,M,E){if(typeof M=="string"&&M!==""||typeof M=="number")return x=x.get(S)||null,o(_,x,""+M,E);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case hm:return x=x.get(M.key===null?S:M.key)||null,c(_,x,M,E);case iu:return x=x.get(M.key===null?S:M.key)||null,u(_,x,M,E);case ao:var C=M._init;return g(x,_,S,C(M._payload),E)}if(ph(M)||Hd(M))return x=x.get(S)||null,f(_,x,M,E,null);Sm(_,M)}return null}function y(x,_,S,M){for(var E=null,C=null,N=_,D=_=0,R=null;N!==null&&D<S.length;D++){N.index>D?(R=N,N=null):R=N.sibling;var k=m(x,N,S[D],M);if(k===null){N===null&&(N=R);break}t&&N&&k.alternate===null&&e(x,N),_=s(k,_,D),C===null?E=k:C.sibling=k,C=k,N=R}if(D===S.length)return n(x,N),pn&&vl(x,D),E;if(N===null){for(;D<S.length;D++)N=p(x,S[D],M),N!==null&&(_=s(N,_,D),C===null?E=N:C.sibling=N,C=N);return pn&&vl(x,D),E}for(N=i(x,N);D<S.length;D++)R=g(N,x,D,S[D],M),R!==null&&(t&&R.alternate!==null&&N.delete(R.key===null?D:R.key),_=s(R,_,D),C===null?E=R:C.sibling=R,C=R);return t&&N.forEach(function(V){return e(x,V)}),pn&&vl(x,D),E}function b(x,_,S,M){var E=Hd(S);if(typeof E!="function")throw Error(Ee(150));if(S=E.call(S),S==null)throw Error(Ee(151));for(var C=E=null,N=_,D=_=0,R=null,k=S.next();N!==null&&!k.done;D++,k=S.next()){N.index>D?(R=N,N=null):R=N.sibling;var V=m(x,N,k.value,M);if(V===null){N===null&&(N=R);break}t&&N&&V.alternate===null&&e(x,N),_=s(V,_,D),C===null?E=V:C.sibling=V,C=V,N=R}if(k.done)return n(x,N),pn&&vl(x,D),E;if(N===null){for(;!k.done;D++,k=S.next())k=p(x,k.value,M),k!==null&&(_=s(k,_,D),C===null?E=k:C.sibling=k,C=k);return pn&&vl(x,D),E}for(N=i(x,N);!k.done;D++,k=S.next())k=g(N,x,D,k.value,M),k!==null&&(t&&k.alternate!==null&&N.delete(k.key===null?D:k.key),_=s(k,_,D),C===null?E=k:C.sibling=k,C=k);return t&&N.forEach(function(G){return e(x,G)}),pn&&vl(x,D),E}function w(x,_,S,M){if(typeof S=="object"&&S!==null&&S.type===ru&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case hm:e:{for(var E=S.key,C=_;C!==null;){if(C.key===E){if(E=S.type,E===ru){if(C.tag===7){n(x,C.sibling),_=r(C,S.props.children),_.return=x,x=_;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ao&&HE(E)===C.type){n(x,C.sibling),_=r(C,S.props),_.ref=$d(x,C,S),_.return=x,x=_;break e}n(x,C);break}else e(x,C);C=C.sibling}S.type===ru?(_=Bl(S.props.children,x.mode,M,S.key),_.return=x,x=_):(M=Hg(S.type,S.key,S.props,null,x.mode,M),M.ref=$d(x,_,S),M.return=x,x=M)}return a(x);case iu:e:{for(C=S.key;_!==null;){if(_.key===C)if(_.tag===4&&_.stateNode.containerInfo===S.containerInfo&&_.stateNode.implementation===S.implementation){n(x,_.sibling),_=r(_,S.children||[]),_.return=x,x=_;break e}else{n(x,_);break}else e(x,_);_=_.sibling}_=W0(S,x.mode,M),_.return=x,x=_}return a(x);case ao:return C=S._init,w(x,_,C(S._payload),M)}if(ph(S))return y(x,_,S,M);if(Hd(S))return b(x,_,S,M);Sm(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,_!==null&&_.tag===6?(n(x,_.sibling),_=r(_,S),_.return=x,x=_):(n(x,_),_=H0(S,x.mode,M),_.return=x,x=_),a(x)):n(x,_)}return w}var qu=FI(!0),jI=FI(!1),xx=Wo(null),yx=null,hu=null,eS=null;function tS(){eS=hu=yx=null}function nS(t){var e=xx.current;ln(xx),t._currentValue=e}function zb(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function Nu(t,e){yx=t,eS=hu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(nr=!0),t.firstContext=null)}function Xr(t){var e=t._currentValue;if(eS!==t)if(t={context:t,memoizedValue:e,next:null},hu===null){if(yx===null)throw Error(Ee(308));hu=t,yx.dependencies={lanes:0,firstContext:t}}else hu=hu.next=t;return e}var El=null;function iS(t){El===null?El=[t]:El.push(t)}function OI(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,iS(e)):(n.next=r.next,r.next=n),e.interleaved=n,Ca(t,i)}function Ca(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var oo=!1;function rS(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function UI(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function _a(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Mo(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,zt&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Ca(t,n)}return r=i.interleaved,r===null?(e.next=e,iS(i)):(e.next=r.next,r.next=e),i.interleaved=e,Ca(t,n)}function jg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,H_(t,n)}}function WE(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?r=s=e:s=s.next=e}else r=s=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function vx(t,e,n,i){var r=t.updateQueue;oo=!1;var s=r.firstBaseUpdate,a=r.lastBaseUpdate,o=r.shared.pending;if(o!==null){r.shared.pending=null;var c=o,u=c.next;c.next=null,a===null?s=u:a.next=u,a=c;var f=t.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=c))}if(s!==null){var p=r.baseState;a=0,f=u=c=null,o=s;do{var m=o.lane,g=o.eventTime;if((i&m)===m){f!==null&&(f=f.next={eventTime:g,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=t,b=o;switch(m=e,g=n,b.tag){case 1:if(y=b.payload,typeof y=="function"){p=y.call(g,p,m);break e}p=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,m=typeof y=="function"?y.call(g,p,m):y,m==null)break e;p=_n({},p,m);break e;case 2:oo=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,m=r.effects,m===null?r.effects=[o]:m.push(o))}else g={eventTime:g,lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=g,c=p):f=f.next=g,a|=m;if(o=o.next,o===null){if(o=r.shared.pending,o===null)break;m=o,o=m.next,m.next=null,r.lastBaseUpdate=m,r.shared.pending=null}}while(!0);if(f===null&&(c=p),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=f,e=r.shared.interleaved,e!==null){r=e;do a|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);ec|=a,t.lanes=a,t.memoizedState=p}}function GE(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(Ee(191,r));r.call(i)}}}var qf={},zs=Wo(qf),Zh=Wo(qf),Jh=Wo(qf);function Cl(t){if(t===qf)throw Error(Ee(174));return t}function sS(t,e){switch(tn(Jh,e),tn(Zh,t),tn(zs,qf),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:wb(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=wb(e,t)}ln(zs),tn(zs,e)}function Xu(){ln(zs),ln(Zh),ln(Jh)}function zI(t){Cl(Jh.current);var e=Cl(zs.current),n=wb(e,t.type);e!==n&&(tn(Zh,t),tn(zs,n))}function aS(t){Zh.current===t&&(ln(zs),ln(Zh))}var yn=Wo(0);function wx(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var j0=[];function oS(){for(var t=0;t<j0.length;t++)j0[t]._workInProgressVersionPrimary=null;j0.length=0}var Og=Fa.ReactCurrentDispatcher,O0=Fa.ReactCurrentBatchConfig,Jl=0,bn=null,Gn=null,ri=null,bx=!1,Th=!1,ef=0,zU=0;function wi(){throw Error(Ee(321))}function lS(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!ms(t[n],e[n]))return!1;return!0}function cS(t,e,n,i,r,s){if(Jl=s,bn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Og.current=t===null||t.memoizedState===null?WU:GU,t=n(i,r),Th){s=0;do{if(Th=!1,ef=0,25<=s)throw Error(Ee(301));s+=1,ri=Gn=null,e.updateQueue=null,Og.current=qU,t=n(i,r)}while(Th)}if(Og.current=_x,e=Gn!==null&&Gn.next!==null,Jl=0,ri=Gn=bn=null,bx=!1,e)throw Error(Ee(300));return t}function uS(){var t=ef!==0;return ef=0,t}function Is(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ri===null?bn.memoizedState=ri=t:ri=ri.next=t,ri}function $r(){if(Gn===null){var t=bn.alternate;t=t!==null?t.memoizedState:null}else t=Gn.next;var e=ri===null?bn.memoizedState:ri.next;if(e!==null)ri=e,Gn=t;else{if(t===null)throw Error(Ee(310));Gn=t,t={memoizedState:Gn.memoizedState,baseState:Gn.baseState,baseQueue:Gn.baseQueue,queue:Gn.queue,next:null},ri===null?bn.memoizedState=ri=t:ri=ri.next=t}return ri}function tf(t,e){return typeof e=="function"?e(t):e}function U0(t){var e=$r(),n=e.queue;if(n===null)throw Error(Ee(311));n.lastRenderedReducer=t;var i=Gn,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var a=r.next;r.next=s.next,s.next=a}i.baseQueue=r=s,n.pending=null}if(r!==null){s=r.next,i=i.baseState;var o=a=null,c=null,u=s;do{var f=u.lane;if((Jl&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:t(i,u.action);else{var p={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(o=c=p,a=i):c=c.next=p,bn.lanes|=f,ec|=f}u=u.next}while(u!==null&&u!==s);c===null?a=i:c.next=o,ms(i,e.memoizedState)||(nr=!0),e.memoizedState=i,e.baseState=a,e.baseQueue=c,n.lastRenderedState=i}if(t=n.interleaved,t!==null){r=t;do s=r.lane,bn.lanes|=s,ec|=s,r=r.next;while(r!==t)}else r===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function z0(t){var e=$r(),n=e.queue;if(n===null)throw Error(Ee(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,s=e.memoizedState;if(r!==null){n.pending=null;var a=r=r.next;do s=t(s,a.action),a=a.next;while(a!==r);ms(s,e.memoizedState)||(nr=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,i]}function BI(){}function VI(t,e){var n=bn,i=$r(),r=e(),s=!ms(i.memoizedState,r);if(s&&(i.memoizedState=r,nr=!0),i=i.queue,dS(GI.bind(null,n,i,t),[t]),i.getSnapshot!==e||s||ri!==null&&ri.memoizedState.tag&1){if(n.flags|=2048,nf(9,WI.bind(null,n,i,r,e),void 0,null),ai===null)throw Error(Ee(349));Jl&30||HI(n,e,r)}return r}function HI(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=bn.updateQueue,e===null?(e={lastEffect:null,stores:null},bn.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function WI(t,e,n,i){e.value=n,e.getSnapshot=i,qI(e)&&XI(t)}function GI(t,e,n){return n(function(){qI(e)&&XI(t)})}function qI(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!ms(t,n)}catch{return!0}}function XI(t){var e=Ca(t,1);e!==null&&ps(e,t,1,-1)}function qE(t){var e=Is();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tf,lastRenderedState:t},e.queue=t,t=t.dispatch=HU.bind(null,bn,t),[e.memoizedState,t]}function nf(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},e=bn.updateQueue,e===null?(e={lastEffect:null,stores:null},bn.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t)),t}function $I(){return $r().memoizedState}function Ug(t,e,n,i){var r=Is();bn.flags|=t,r.memoizedState=nf(1|e,n,void 0,i===void 0?null:i)}function iy(t,e,n,i){var r=$r();i=i===void 0?null:i;var s=void 0;if(Gn!==null){var a=Gn.memoizedState;if(s=a.destroy,i!==null&&lS(i,a.deps)){r.memoizedState=nf(e,n,s,i);return}}bn.flags|=t,r.memoizedState=nf(1|e,n,s,i)}function XE(t,e){return Ug(8390656,8,t,e)}function dS(t,e){return iy(2048,8,t,e)}function YI(t,e){return iy(4,2,t,e)}function QI(t,e){return iy(4,4,t,e)}function KI(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function ZI(t,e,n){return n=n!=null?n.concat([t]):null,iy(4,4,KI.bind(null,e,t),n)}function hS(){}function JI(t,e){var n=$r();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&lS(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function ek(t,e){var n=$r();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&lS(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function tk(t,e,n){return Jl&21?(ms(n,e)||(n=aI(),bn.lanes|=n,ec|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,nr=!0),t.memoizedState=n)}function BU(t,e){var n=Qt;Qt=n!==0&&4>n?n:4,t(!0);var i=O0.transition;O0.transition={};try{t(!1),e()}finally{Qt=n,O0.transition=i}}function nk(){return $r().memoizedState}function VU(t,e,n){var i=Eo(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},ik(t))rk(e,n);else if(n=OI(t,e,n,i),n!==null){var r=Bi();ps(n,t,i,r),sk(n,e,i)}}function HU(t,e,n){var i=Eo(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(ik(t))rk(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var a=e.lastRenderedState,o=s(a,n);if(r.hasEagerState=!0,r.eagerState=o,ms(o,a)){var c=e.interleaved;c===null?(r.next=r,iS(e)):(r.next=c.next,c.next=r),e.interleaved=r;return}}catch{}finally{}n=OI(t,e,r,i),n!==null&&(r=Bi(),ps(n,t,i,r),sk(n,e,i))}}function ik(t){var e=t.alternate;return t===bn||e!==null&&e===bn}function rk(t,e){Th=bx=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function sk(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,H_(t,n)}}var _x={readContext:Xr,useCallback:wi,useContext:wi,useEffect:wi,useImperativeHandle:wi,useInsertionEffect:wi,useLayoutEffect:wi,useMemo:wi,useReducer:wi,useRef:wi,useState:wi,useDebugValue:wi,useDeferredValue:wi,useTransition:wi,useMutableSource:wi,useSyncExternalStore:wi,useId:wi,unstable_isNewReconciler:!1},WU={readContext:Xr,useCallback:function(t,e){return Is().memoizedState=[t,e===void 0?null:e],t},useContext:Xr,useEffect:XE,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Ug(4194308,4,KI.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ug(4194308,4,t,e)},useInsertionEffect:function(t,e){return Ug(4,2,t,e)},useMemo:function(t,e){var n=Is();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=Is();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=VU.bind(null,bn,t),[i.memoizedState,t]},useRef:function(t){var e=Is();return t={current:t},e.memoizedState=t},useState:qE,useDebugValue:hS,useDeferredValue:function(t){return Is().memoizedState=t},useTransition:function(){var t=qE(!1),e=t[0];return t=BU.bind(null,t[1]),Is().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=bn,r=Is();if(pn){if(n===void 0)throw Error(Ee(407));n=n()}else{if(n=e(),ai===null)throw Error(Ee(349));Jl&30||HI(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,XE(GI.bind(null,i,s,t),[t]),i.flags|=2048,nf(9,WI.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=Is(),e=ai.identifierPrefix;if(pn){var n=va,i=ya;n=(i&~(1<<32-fs(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=ef++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=zU++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},GU={readContext:Xr,useCallback:JI,useContext:Xr,useEffect:dS,useImperativeHandle:ZI,useInsertionEffect:YI,useLayoutEffect:QI,useMemo:ek,useReducer:U0,useRef:$I,useState:function(){return U0(tf)},useDebugValue:hS,useDeferredValue:function(t){var e=$r();return tk(e,Gn.memoizedState,t)},useTransition:function(){var t=U0(tf)[0],e=$r().memoizedState;return[t,e]},useMutableSource:BI,useSyncExternalStore:VI,useId:nk,unstable_isNewReconciler:!1},qU={readContext:Xr,useCallback:JI,useContext:Xr,useEffect:dS,useImperativeHandle:ZI,useInsertionEffect:YI,useLayoutEffect:QI,useMemo:ek,useReducer:z0,useRef:$I,useState:function(){return z0(tf)},useDebugValue:hS,useDeferredValue:function(t){var e=$r();return Gn===null?e.memoizedState=t:tk(e,Gn.memoizedState,t)},useTransition:function(){var t=z0(tf)[0],e=$r().memoizedState;return[t,e]},useMutableSource:BI,useSyncExternalStore:VI,useId:nk,unstable_isNewReconciler:!1};function is(t,e){if(t&&t.defaultProps){e=_n({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function Bb(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:_n({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var ry={isMounted:function(t){return(t=t._reactInternals)?lc(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=Bi(),r=Eo(t),s=_a(i,r);s.payload=e,n!=null&&(s.callback=n),e=Mo(t,s,r),e!==null&&(ps(e,t,r,i),jg(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=Bi(),r=Eo(t),s=_a(i,r);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=Mo(t,s,r),e!==null&&(ps(e,t,r,i),jg(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Bi(),i=Eo(t),r=_a(n,i);r.tag=2,e!=null&&(r.callback=e),e=Mo(t,r,i),e!==null&&(ps(e,t,i,n),jg(e,t,i))}};function $E(t,e,n,i,r,s,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,s,a):e.prototype&&e.prototype.isPureReactComponent?!$h(n,i)||!$h(r,s):!0}function ak(t,e,n){var i=!1,r=Lo,s=e.contextType;return typeof s=="object"&&s!==null?s=Xr(s):(r=rr(e)?Kl:Ri.current,i=e.contextTypes,s=(i=i!=null)?Wu(t,r):Lo),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=ry,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function YE(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&ry.enqueueReplaceState(e,e.state,null)}function Vb(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},rS(t);var s=e.contextType;typeof s=="object"&&s!==null?r.context=Xr(s):(s=rr(e)?Kl:Ri.current,r.context=Wu(t,s)),r.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(Bb(t,e,s,n),r.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(e=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),e!==r.state&&ry.enqueueReplaceState(r,r.state,null),vx(t,n,r,i),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308)}function $u(t,e){try{var n="",i=e;do n+=w5(i),i=i.return;while(i);var r=n}catch(s){r=`
Error generating stack: `+s.message+`
`+s.stack}return{value:t,source:e,stack:r,digest:null}}function B0(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Hb(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var XU=typeof WeakMap=="function"?WeakMap:Map;function ok(t,e,n){n=_a(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){Ax||(Ax=!0,Jb=i),Hb(t,e)},n}function lk(t,e,n){n=_a(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){Hb(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Hb(t,e),typeof i!="function"&&(To===null?To=new Set([this]):To.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),n}function QE(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new XU;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=oz.bind(null,t,e,n),e.then(t,t))}function KE(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function ZE(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=_a(-1,1),e.tag=2,Mo(n,e,1))),n.lanes|=1),t)}var $U=Fa.ReactCurrentOwner,nr=!1;function Oi(t,e,n,i){e.child=t===null?jI(e,null,n,i):qu(e,t.child,n,i)}function JE(t,e,n,i,r){n=n.render;var s=e.ref;return Nu(e,r),i=cS(t,e,n,i,s,r),n=uS(),t!==null&&!nr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Pa(t,e,r)):(pn&&n&&K_(e),e.flags|=1,Oi(t,e,i,r),e.child)}function eC(t,e,n,i,r){if(t===null){var s=n.type;return typeof s=="function"&&!wS(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,ck(t,e,s,i,r)):(t=Hg(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&r)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:$h,n(a,i)&&t.ref===e.ref)return Pa(t,e,r)}return e.flags|=1,t=Co(s,i),t.ref=e.ref,t.return=e,e.child=t}function ck(t,e,n,i,r){if(t!==null){var s=t.memoizedProps;if($h(s,i)&&t.ref===e.ref)if(nr=!1,e.pendingProps=i=s,(t.lanes&r)!==0)t.flags&131072&&(nr=!0);else return e.lanes=t.lanes,Pa(t,e,r)}return Wb(t,e,n,i,r)}function uk(t,e,n){var i=e.pendingProps,r=i.children,s=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},tn(pu,mr),mr|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,tn(pu,mr),mr|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,tn(pu,mr),mr|=i}else s!==null?(i=s.baseLanes|n,e.memoizedState=null):i=n,tn(pu,mr),mr|=i;return Oi(t,e,r,n),e.child}function dk(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Wb(t,e,n,i,r){var s=rr(n)?Kl:Ri.current;return s=Wu(e,s),Nu(e,r),n=cS(t,e,n,i,s,r),i=uS(),t!==null&&!nr?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,Pa(t,e,r)):(pn&&i&&K_(e),e.flags|=1,Oi(t,e,n,r),e.child)}function tC(t,e,n,i,r){if(rr(n)){var s=!0;px(e)}else s=!1;if(Nu(e,r),e.stateNode===null)zg(t,e),ak(e,n,i),Vb(e,n,i,r),i=!0;else if(t===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Xr(u):(u=rr(n)?Kl:Ri.current,u=Wu(e,u));var f=n.getDerivedStateFromProps,p=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";p||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==i||c!==u)&&YE(e,a,i,u),oo=!1;var m=e.memoizedState;a.state=m,vx(e,i,a,r),c=e.memoizedState,o!==i||m!==c||ir.current||oo?(typeof f=="function"&&(Bb(e,n,f,i),c=e.memoizedState),(o=oo||$E(e,n,o,i,m,c,u))?(p||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=c),a.props=i,a.state=c,a.context=u,i=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{a=e.stateNode,UI(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:is(e.type,o),a.props=u,p=e.pendingProps,m=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=Xr(c):(c=rr(n)?Kl:Ri.current,c=Wu(e,c));var g=n.getDerivedStateFromProps;(f=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==p||m!==c)&&YE(e,a,i,c),oo=!1,m=e.memoizedState,a.state=m,vx(e,i,a,r);var y=e.memoizedState;o!==p||m!==y||ir.current||oo?(typeof g=="function"&&(Bb(e,n,g,i),y=e.memoizedState),(u=oo||$E(e,n,u,i,m,y,c)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(i,y,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(i,y,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=y),a.props=i,a.state=y,a.context=c,i=u):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),i=!1)}return Gb(t,e,n,i,s,r)}function Gb(t,e,n,i,r,s){dk(t,e);var a=(e.flags&128)!==0;if(!i&&!a)return r&&zE(e,n,!1),Pa(t,e,s);i=e.stateNode,$U.current=e;var o=a&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&a?(e.child=qu(e,t.child,null,s),e.child=qu(e,null,o,s)):Oi(t,e,o,s),e.memoizedState=i.state,r&&zE(e,n,!0),e.child}function hk(t){var e=t.stateNode;e.pendingContext?UE(t,e.pendingContext,e.pendingContext!==e.context):e.context&&UE(t,e.context,!1),sS(t,e.containerInfo)}function nC(t,e,n,i,r){return Gu(),J_(r),e.flags|=256,Oi(t,e,n,i),e.child}var qb={dehydrated:null,treeContext:null,retryLane:0};function Xb(t){return{baseLanes:t,cachePool:null,transitions:null}}function fk(t,e,n){var i=e.pendingProps,r=yn.current,s=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=t!==null&&t.memoizedState===null?!1:(r&2)!==0),o?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),tn(yn,r&1),t===null)return Ub(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=i.children,t=i.fallback,s?(i=e.mode,s=e.child,a={mode:"hidden",children:a},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=oy(a,i,0,null),t=Bl(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Xb(n),e.memoizedState=qb,t):fS(e,a));if(r=t.memoizedState,r!==null&&(o=r.dehydrated,o!==null))return YU(t,e,a,i,o,r,n);if(s){s=i.fallback,a=e.mode,r=t.child,o=r.sibling;var c={mode:"hidden",children:i.children};return!(a&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=c,e.deletions=null):(i=Co(r,c),i.subtreeFlags=r.subtreeFlags&14680064),o!==null?s=Co(o,s):(s=Bl(s,a,n,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,a=t.child.memoizedState,a=a===null?Xb(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=t.childLanes&~n,e.memoizedState=qb,i}return s=t.child,t=s.sibling,i=Co(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function fS(t,e){return e=oy({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Am(t,e,n,i){return i!==null&&J_(i),qu(e,t.child,null,n),t=fS(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function YU(t,e,n,i,r,s,a){if(n)return e.flags&256?(e.flags&=-257,i=B0(Error(Ee(422))),Am(t,e,a,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=oy({mode:"visible",children:i.children},r,0,null),s=Bl(s,r,a,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&qu(e,t.child,null,a),e.child.memoizedState=Xb(a),e.memoizedState=qb,s);if(!(e.mode&1))return Am(t,e,a,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var o=i.dgst;return i=o,s=Error(Ee(419)),i=B0(s,i,void 0),Am(t,e,a,i)}if(o=(a&t.childLanes)!==0,nr||o){if(i=ai,i!==null){switch(a&-a){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|a)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Ca(t,r),ps(i,t,r,-1))}return vS(),i=B0(Error(Ee(421))),Am(t,e,a,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=lz.bind(null,t),r._reactRetry=e,null):(t=s.treeContext,yr=Ao(r.nextSibling),vr=e,pn=!0,cs=null,t!==null&&(Vr[Hr++]=ya,Vr[Hr++]=va,Vr[Hr++]=Zl,ya=t.id,va=t.overflow,Zl=e),e=fS(e,i.children),e.flags|=4096,e)}function iC(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),zb(t.return,e,n)}function V0(t,e,n,i,r){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function pk(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(Oi(t,e,i.children,n),i=yn.current,i&2)i=i&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&iC(t,n,e);else if(t.tag===19)iC(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(tn(yn,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&wx(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),V0(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&wx(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}V0(e,!0,n,null,s);break;case"together":V0(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function zg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Pa(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),ec|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Ee(153));if(e.child!==null){for(t=e.child,n=Co(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Co(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function QU(t,e,n){switch(e.tag){case 3:hk(e),Gu();break;case 5:zI(e);break;case 1:rr(e.type)&&px(e);break;case 4:sS(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;tn(xx,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(tn(yn,yn.current&1),e.flags|=128,null):n&e.child.childLanes?fk(t,e,n):(tn(yn,yn.current&1),t=Pa(t,e,n),t!==null?t.sibling:null);tn(yn,yn.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return pk(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),tn(yn,yn.current),i)break;return null;case 22:case 23:return e.lanes=0,uk(t,e,n)}return Pa(t,e,n)}var mk,$b,gk,xk;mk=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$b=function(){};gk=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,Cl(zs.current);var s=null;switch(n){case"input":r=gb(t,r),i=gb(t,i),s=[];break;case"select":r=_n({},r,{value:void 0}),i=_n({},i,{value:void 0}),s=[];break;case"textarea":r=vb(t,r),i=vb(t,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=hx)}bb(n,i);var a;n=null;for(u in r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var o=r[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Bh.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in i){var c=i[u];if(o=r!=null?r[u]:void 0,i.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&o[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Bh.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&an("scroll",t),s||o===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};xk=function(t,e,n,i){n!==i&&(e.flags|=4)};function Yd(t,e){if(!pn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function bi(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function KU(t,e,n){var i=e.pendingProps;switch(Z_(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bi(e),null;case 1:return rr(e.type)&&fx(),bi(e),null;case 3:return i=e.stateNode,Xu(),ln(ir),ln(Ri),oS(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(_m(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,cs!==null&&(n1(cs),cs=null))),$b(t,e),bi(e),null;case 5:aS(e);var r=Cl(Jh.current);if(n=e.type,t!==null&&e.stateNode!=null)gk(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(Ee(166));return bi(e),null}if(t=Cl(zs.current),_m(e)){i=e.stateNode,n=e.type;var s=e.memoizedProps;switch(i[Fs]=e,i[Kh]=s,t=(e.mode&1)!==0,n){case"dialog":an("cancel",i),an("close",i);break;case"iframe":case"object":case"embed":an("load",i);break;case"video":case"audio":for(r=0;r<gh.length;r++)an(gh[r],i);break;case"source":an("error",i);break;case"img":case"image":case"link":an("error",i),an("load",i);break;case"details":an("toggle",i);break;case"input":hE(i,s),an("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},an("invalid",i);break;case"textarea":pE(i,s),an("invalid",i)}bb(n,s),r=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];a==="children"?typeof o=="string"?i.textContent!==o&&(s.suppressHydrationWarning!==!0&&bm(i.textContent,o,t),r=["children",o]):typeof o=="number"&&i.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&bm(i.textContent,o,t),r=["children",""+o]):Bh.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&an("scroll",i)}switch(n){case"input":fm(i),fE(i,s,!0);break;case"textarea":fm(i),mE(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=hx)}i=r,e.updateQueue=i,i!==null&&(e.flags|=4)}else{a=r.nodeType===9?r:r.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=GR(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=a.createElement(n,{is:i.is}):(t=a.createElement(n),n==="select"&&(a=t,i.multiple?a.multiple=!0:i.size&&(a.size=i.size))):t=a.createElementNS(t,n),t[Fs]=e,t[Kh]=i,mk(t,e,!1,!1),e.stateNode=t;e:{switch(a=_b(n,i),n){case"dialog":an("cancel",t),an("close",t),r=i;break;case"iframe":case"object":case"embed":an("load",t),r=i;break;case"video":case"audio":for(r=0;r<gh.length;r++)an(gh[r],t);r=i;break;case"source":an("error",t),r=i;break;case"img":case"image":case"link":an("error",t),an("load",t),r=i;break;case"details":an("toggle",t),r=i;break;case"input":hE(t,i),r=gb(t,i),an("invalid",t);break;case"option":r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=_n({},i,{value:void 0}),an("invalid",t);break;case"textarea":pE(t,i),r=vb(t,i),an("invalid",t);break;default:r=i}bb(n,r),o=r;for(s in o)if(o.hasOwnProperty(s)){var c=o[s];s==="style"?$R(t,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&qR(t,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Vh(t,c):typeof c=="number"&&Vh(t,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Bh.hasOwnProperty(s)?c!=null&&s==="onScroll"&&an("scroll",t):c!=null&&j_(t,s,c,a))}switch(n){case"input":fm(t),fE(t,i,!1);break;case"textarea":fm(t),mE(t);break;case"option":i.value!=null&&t.setAttribute("value",""+ko(i.value));break;case"select":t.multiple=!!i.multiple,s=i.value,s!=null?Tu(t,!!i.multiple,s,!1):i.defaultValue!=null&&Tu(t,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(t.onclick=hx)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return bi(e),null;case 6:if(t&&e.stateNode!=null)xk(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(Ee(166));if(n=Cl(Jh.current),Cl(zs.current),_m(e)){if(i=e.stateNode,n=e.memoizedProps,i[Fs]=e,(s=i.nodeValue!==n)&&(t=vr,t!==null))switch(t.tag){case 3:bm(i.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&bm(i.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Fs]=e,e.stateNode=i}return bi(e),null;case 13:if(ln(yn),i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(pn&&yr!==null&&e.mode&1&&!(e.flags&128))DI(),Gu(),e.flags|=98560,s=!1;else if(s=_m(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(Ee(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Ee(317));s[Fs]=e}else Gu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;bi(e),s=!1}else cs!==null&&(n1(cs),cs=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(i=i!==null,i!==(t!==null&&t.memoizedState!==null)&&i&&(e.child.flags|=8192,e.mode&1&&(t===null||yn.current&1?Xn===0&&(Xn=3):vS())),e.updateQueue!==null&&(e.flags|=4),bi(e),null);case 4:return Xu(),$b(t,e),t===null&&Yh(e.stateNode.containerInfo),bi(e),null;case 10:return nS(e.type._context),bi(e),null;case 17:return rr(e.type)&&fx(),bi(e),null;case 19:if(ln(yn),s=e.memoizedState,s===null)return bi(e),null;if(i=(e.flags&128)!==0,a=s.rendering,a===null)if(i)Yd(s,!1);else{if(Xn!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=wx(t),a!==null){for(e.flags|=128,Yd(s,!1),i=a.updateQueue,i!==null&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=n,n=e.child;n!==null;)s=n,t=i,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,t=a.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return tn(yn,yn.current&1|2),e.child}t=t.sibling}s.tail!==null&&Dn()>Yu&&(e.flags|=128,i=!0,Yd(s,!1),e.lanes=4194304)}else{if(!i)if(t=wx(a),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Yd(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!pn)return bi(e),null}else 2*Dn()-s.renderingStartTime>Yu&&n!==1073741824&&(e.flags|=128,i=!0,Yd(s,!1),e.lanes=4194304);s.isBackwards?(a.sibling=e.child,e.child=a):(n=s.last,n!==null?n.sibling=a:e.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Dn(),e.sibling=null,n=yn.current,tn(yn,i?n&1|2:n&1),e):(bi(e),null);case 22:case 23:return yS(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?mr&1073741824&&(bi(e),e.subtreeFlags&6&&(e.flags|=8192)):bi(e),null;case 24:return null;case 25:return null}throw Error(Ee(156,e.tag))}function ZU(t,e){switch(Z_(e),e.tag){case 1:return rr(e.type)&&fx(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Xu(),ln(ir),ln(Ri),oS(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return aS(e),null;case 13:if(ln(yn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ee(340));Gu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ln(yn),null;case 4:return Xu(),null;case 10:return nS(e.type._context),null;case 22:case 23:return yS(),null;case 24:return null;default:return null}}var Mm=!1,Ei=!1,JU=typeof WeakSet=="function"?WeakSet:Set,He=null;function fu(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){Cn(t,e,i)}else n.current=null}function Yb(t,e,n){try{n()}catch(i){Cn(t,e,i)}}var rC=!1;function ez(t,e){if(Ib=cx,t=_I(),Q_(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,c=-1,u=0,f=0,p=t,m=null;t:for(;;){for(var g;p!==n||r!==0&&p.nodeType!==3||(o=a+r),p!==s||i!==0&&p.nodeType!==3||(c=a+i),p.nodeType===3&&(a+=p.nodeValue.length),(g=p.firstChild)!==null;)m=p,p=g;for(;;){if(p===t)break t;if(m===n&&++u===r&&(o=a),m===s&&++f===i&&(c=a),(g=p.nextSibling)!==null)break;p=m,m=p.parentNode}p=g}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(kb={focusedElem:t,selectionRange:n},cx=!1,He=e;He!==null;)if(e=He,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,He=t;else for(;He!==null;){e=He;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var b=y.memoizedProps,w=y.memoizedState,x=e.stateNode,_=x.getSnapshotBeforeUpdate(e.elementType===e.type?b:is(e.type,b),w);x.__reactInternalSnapshotBeforeUpdate=_}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ee(163))}}catch(M){Cn(e,e.return,M)}if(t=e.sibling,t!==null){t.return=e.return,He=t;break}He=e.return}return y=rC,rC=!1,y}function Eh(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,s!==void 0&&Yb(e,n,s)}r=r.next}while(r!==i)}}function sy(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function Qb(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function yk(t){var e=t.alternate;e!==null&&(t.alternate=null,yk(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Fs],delete e[Kh],delete e[Fb],delete e[FU],delete e[jU])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function vk(t){return t.tag===5||t.tag===3||t.tag===4}function sC(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||vk(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Kb(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=hx));else if(i!==4&&(t=t.child,t!==null))for(Kb(t,e,n),t=t.sibling;t!==null;)Kb(t,e,n),t=t.sibling}function Zb(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(Zb(t,e,n),t=t.sibling;t!==null;)Zb(t,e,n),t=t.sibling}var di=null,ls=!1;function $a(t,e,n){for(n=n.child;n!==null;)wk(t,e,n),n=n.sibling}function wk(t,e,n){if(Us&&typeof Us.onCommitFiberUnmount=="function")try{Us.onCommitFiberUnmount(Kx,n)}catch{}switch(n.tag){case 5:Ei||fu(n,e);case 6:var i=di,r=ls;di=null,$a(t,e,n),di=i,ls=r,di!==null&&(ls?(t=di,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):di.removeChild(n.stateNode));break;case 18:di!==null&&(ls?(t=di,n=n.stateNode,t.nodeType===8?D0(t.parentNode,n):t.nodeType===1&&D0(t,n),qh(t)):D0(di,n.stateNode));break;case 4:i=di,r=ls,di=n.stateNode.containerInfo,ls=!0,$a(t,e,n),di=i,ls=r;break;case 0:case 11:case 14:case 15:if(!Ei&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Yb(n,e,a),r=r.next}while(r!==i)}$a(t,e,n);break;case 1:if(!Ei&&(fu(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(o){Cn(n,e,o)}$a(t,e,n);break;case 21:$a(t,e,n);break;case 22:n.mode&1?(Ei=(i=Ei)||n.memoizedState!==null,$a(t,e,n),Ei=i):$a(t,e,n);break;default:$a(t,e,n)}}function aC(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new JU),e.forEach(function(i){var r=cz.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function Kr(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var s=t,a=e,o=a;e:for(;o!==null;){switch(o.tag){case 5:di=o.stateNode,ls=!1;break e;case 3:di=o.stateNode.containerInfo,ls=!0;break e;case 4:di=o.stateNode.containerInfo,ls=!0;break e}o=o.return}if(di===null)throw Error(Ee(160));wk(s,a,r),di=null,ls=!1;var c=r.alternate;c!==null&&(c.return=null),r.return=null}catch(u){Cn(r,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)bk(e,t),e=e.sibling}function bk(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Kr(e,t),Rs(t),i&4){try{Eh(3,t,t.return),sy(3,t)}catch(b){Cn(t,t.return,b)}try{Eh(5,t,t.return)}catch(b){Cn(t,t.return,b)}}break;case 1:Kr(e,t),Rs(t),i&512&&n!==null&&fu(n,n.return);break;case 5:if(Kr(e,t),Rs(t),i&512&&n!==null&&fu(n,n.return),t.flags&32){var r=t.stateNode;try{Vh(r,"")}catch(b){Cn(t,t.return,b)}}if(i&4&&(r=t.stateNode,r!=null)){var s=t.memoizedProps,a=n!==null?n.memoizedProps:s,o=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&HR(r,s),_b(o,a);var u=_b(o,s);for(a=0;a<c.length;a+=2){var f=c[a],p=c[a+1];f==="style"?$R(r,p):f==="dangerouslySetInnerHTML"?qR(r,p):f==="children"?Vh(r,p):j_(r,f,p,u)}switch(o){case"input":xb(r,s);break;case"textarea":WR(r,s);break;case"select":var m=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var g=s.value;g!=null?Tu(r,!!s.multiple,g,!1):m!==!!s.multiple&&(s.defaultValue!=null?Tu(r,!!s.multiple,s.defaultValue,!0):Tu(r,!!s.multiple,s.multiple?[]:"",!1))}r[Kh]=s}catch(b){Cn(t,t.return,b)}}break;case 6:if(Kr(e,t),Rs(t),i&4){if(t.stateNode===null)throw Error(Ee(162));r=t.stateNode,s=t.memoizedProps;try{r.nodeValue=s}catch(b){Cn(t,t.return,b)}}break;case 3:if(Kr(e,t),Rs(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{qh(e.containerInfo)}catch(b){Cn(t,t.return,b)}break;case 4:Kr(e,t),Rs(t);break;case 13:Kr(e,t),Rs(t),r=t.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(gS=Dn())),i&4&&aC(t);break;case 22:if(f=n!==null&&n.memoizedState!==null,t.mode&1?(Ei=(u=Ei)||f,Kr(e,t),Ei=u):Kr(e,t),Rs(t),i&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!f&&t.mode&1)for(He=t,f=t.child;f!==null;){for(p=He=f;He!==null;){switch(m=He,g=m.child,m.tag){case 0:case 11:case 14:case 15:Eh(4,m,m.return);break;case 1:fu(m,m.return);var y=m.stateNode;if(typeof y.componentWillUnmount=="function"){i=m,n=m.return;try{e=i,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(b){Cn(i,n,b)}}break;case 5:fu(m,m.return);break;case 22:if(m.memoizedState!==null){lC(p);continue}}g!==null?(g.return=m,He=g):lC(p)}f=f.sibling}e:for(f=null,p=t;;){if(p.tag===5){if(f===null){f=p;try{r=p.stateNode,u?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=p.stateNode,c=p.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=XR("display",a))}catch(b){Cn(t,t.return,b)}}}else if(p.tag===6){if(f===null)try{p.stateNode.nodeValue=u?"":p.memoizedProps}catch(b){Cn(t,t.return,b)}}else if((p.tag!==22&&p.tag!==23||p.memoizedState===null||p===t)&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===t)break e;for(;p.sibling===null;){if(p.return===null||p.return===t)break e;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}}break;case 19:Kr(e,t),Rs(t),i&4&&aC(t);break;case 21:break;default:Kr(e,t),Rs(t)}}function Rs(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(vk(n)){var i=n;break e}n=n.return}throw Error(Ee(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(Vh(r,""),i.flags&=-33);var s=sC(t);Zb(t,s,r);break;case 3:case 4:var a=i.stateNode.containerInfo,o=sC(t);Kb(t,o,a);break;default:throw Error(Ee(161))}}catch(c){Cn(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function tz(t,e,n){He=t,_k(t)}function _k(t,e,n){for(var i=(t.mode&1)!==0;He!==null;){var r=He,s=r.child;if(r.tag===22&&i){var a=r.memoizedState!==null||Mm;if(!a){var o=r.alternate,c=o!==null&&o.memoizedState!==null||Ei;o=Mm;var u=Ei;if(Mm=a,(Ei=c)&&!u)for(He=r;He!==null;)a=He,c=a.child,a.tag===22&&a.memoizedState!==null?cC(r):c!==null?(c.return=a,He=c):cC(r);for(;s!==null;)He=s,_k(s),s=s.sibling;He=r,Mm=o,Ei=u}oC(t)}else r.subtreeFlags&8772&&s!==null?(s.return=r,He=s):oC(t)}}function oC(t){for(;He!==null;){var e=He;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ei||sy(5,e);break;case 1:var i=e.stateNode;if(e.flags&4&&!Ei)if(n===null)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:is(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&GE(e,s,i);break;case 3:var a=e.updateQueue;if(a!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}GE(e,a,n)}break;case 5:var o=e.stateNode;if(n===null&&e.flags&4){n=o;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var p=f.dehydrated;p!==null&&qh(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ee(163))}Ei||e.flags&512&&Qb(e)}catch(m){Cn(e,e.return,m)}}if(e===t){He=null;break}if(n=e.sibling,n!==null){n.return=e.return,He=n;break}He=e.return}}function lC(t){for(;He!==null;){var e=He;if(e===t){He=null;break}var n=e.sibling;if(n!==null){n.return=e.return,He=n;break}He=e.return}}function cC(t){for(;He!==null;){var e=He;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{sy(4,e)}catch(c){Cn(e,n,c)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(c){Cn(e,r,c)}}var s=e.return;try{Qb(e)}catch(c){Cn(e,s,c)}break;case 5:var a=e.return;try{Qb(e)}catch(c){Cn(e,a,c)}}}catch(c){Cn(e,e.return,c)}if(e===t){He=null;break}var o=e.sibling;if(o!==null){o.return=e.return,He=o;break}He=e.return}}var nz=Math.ceil,Sx=Fa.ReactCurrentDispatcher,pS=Fa.ReactCurrentOwner,Gr=Fa.ReactCurrentBatchConfig,zt=0,ai=null,Hn=null,fi=0,mr=0,pu=Wo(0),Xn=0,rf=null,ec=0,ay=0,mS=0,Ch=null,Ji=null,gS=0,Yu=1/0,pa=null,Ax=!1,Jb=null,To=null,Tm=!1,vo=null,Mx=0,Ph=0,e1=null,Bg=-1,Vg=0;function Bi(){return zt&6?Dn():Bg!==-1?Bg:Bg=Dn()}function Eo(t){return t.mode&1?zt&2&&fi!==0?fi&-fi:UU.transition!==null?(Vg===0&&(Vg=aI()),Vg):(t=Qt,t!==0||(t=window.event,t=t===void 0?16:fI(t.type)),t):1}function ps(t,e,n,i){if(50<Ph)throw Ph=0,e1=null,Error(Ee(185));Hf(t,n,i),(!(zt&2)||t!==ai)&&(t===ai&&(!(zt&2)&&(ay|=n),Xn===4&&uo(t,fi)),sr(t,i),n===1&&zt===0&&!(e.mode&1)&&(Yu=Dn()+500,ny&&Go()))}function sr(t,e){var n=t.callbackNode;U5(t,e);var i=lx(t,t===ai?fi:0);if(i===0)n!==null&&yE(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(n!=null&&yE(n),e===1)t.tag===0?OU(uC.bind(null,t)):II(uC.bind(null,t)),LU(function(){!(zt&6)&&Go()}),n=null;else{switch(oI(i)){case 1:n=V_;break;case 4:n=rI;break;case 16:n=ox;break;case 536870912:n=sI;break;default:n=ox}n=Nk(n,Sk.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Sk(t,e){if(Bg=-1,Vg=0,zt&6)throw Error(Ee(327));var n=t.callbackNode;if(Ru()&&t.callbackNode!==n)return null;var i=lx(t,t===ai?fi:0);if(i===0)return null;if(i&30||i&t.expiredLanes||e)e=Tx(t,i);else{e=i;var r=zt;zt|=2;var s=Mk();(ai!==t||fi!==e)&&(pa=null,Yu=Dn()+500,zl(t,e));do try{sz();break}catch(o){Ak(t,o)}while(!0);tS(),Sx.current=s,zt=r,Hn!==null?e=0:(ai=null,fi=0,e=Xn)}if(e!==0){if(e===2&&(r=Eb(t),r!==0&&(i=r,e=t1(t,r))),e===1)throw n=rf,zl(t,0),uo(t,i),sr(t,Dn()),n;if(e===6)uo(t,i);else{if(r=t.current.alternate,!(i&30)&&!iz(r)&&(e=Tx(t,i),e===2&&(s=Eb(t),s!==0&&(i=s,e=t1(t,s))),e===1))throw n=rf,zl(t,0),uo(t,i),sr(t,Dn()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(Ee(345));case 2:wl(t,Ji,pa);break;case 3:if(uo(t,i),(i&130023424)===i&&(e=gS+500-Dn(),10<e)){if(lx(t,0)!==0)break;if(r=t.suspendedLanes,(r&i)!==i){Bi(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=Db(wl.bind(null,t,Ji,pa),e);break}wl(t,Ji,pa);break;case 4:if(uo(t,i),(i&4194240)===i)break;for(e=t.eventTimes,r=-1;0<i;){var a=31-fs(i);s=1<<a,a=e[a],a>r&&(r=a),i&=~s}if(i=r,i=Dn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*nz(i/1960))-i,10<i){t.timeoutHandle=Db(wl.bind(null,t,Ji,pa),i);break}wl(t,Ji,pa);break;case 5:wl(t,Ji,pa);break;default:throw Error(Ee(329))}}}return sr(t,Dn()),t.callbackNode===n?Sk.bind(null,t):null}function t1(t,e){var n=Ch;return t.current.memoizedState.isDehydrated&&(zl(t,e).flags|=256),t=Tx(t,e),t!==2&&(e=Ji,Ji=n,e!==null&&n1(e)),t}function n1(t){Ji===null?Ji=t:Ji.push.apply(Ji,t)}function iz(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!ms(s(),r))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function uo(t,e){for(e&=~mS,e&=~ay,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-fs(e),i=1<<n;t[n]=-1,e&=~i}}function uC(t){if(zt&6)throw Error(Ee(327));Ru();var e=lx(t,0);if(!(e&1))return sr(t,Dn()),null;var n=Tx(t,e);if(t.tag!==0&&n===2){var i=Eb(t);i!==0&&(e=i,n=t1(t,i))}if(n===1)throw n=rf,zl(t,0),uo(t,e),sr(t,Dn()),n;if(n===6)throw Error(Ee(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,wl(t,Ji,pa),sr(t,Dn()),null}function xS(t,e){var n=zt;zt|=1;try{return t(e)}finally{zt=n,zt===0&&(Yu=Dn()+500,ny&&Go())}}function tc(t){vo!==null&&vo.tag===0&&!(zt&6)&&Ru();var e=zt;zt|=1;var n=Gr.transition,i=Qt;try{if(Gr.transition=null,Qt=1,t)return t()}finally{Qt=i,Gr.transition=n,zt=e,!(zt&6)&&Go()}}function yS(){mr=pu.current,ln(pu)}function zl(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,kU(n)),Hn!==null)for(n=Hn.return;n!==null;){var i=n;switch(Z_(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&fx();break;case 3:Xu(),ln(ir),ln(Ri),oS();break;case 5:aS(i);break;case 4:Xu();break;case 13:ln(yn);break;case 19:ln(yn);break;case 10:nS(i.type._context);break;case 22:case 23:yS()}n=n.return}if(ai=t,Hn=t=Co(t.current,null),fi=mr=e,Xn=0,rf=null,mS=ay=ec=0,Ji=Ch=null,El!==null){for(e=0;e<El.length;e++)if(n=El[e],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,s=n.pending;if(s!==null){var a=s.next;s.next=r,i.next=a}n.pending=i}El=null}return t}function Ak(t,e){do{var n=Hn;try{if(tS(),Og.current=_x,bx){for(var i=bn.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}bx=!1}if(Jl=0,ri=Gn=bn=null,Th=!1,ef=0,pS.current=null,n===null||n.return===null){Xn=1,rf=e,Hn=null;break}e:{var s=t,a=n.return,o=n,c=e;if(e=fi,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=o,p=f.tag;if(!(f.mode&1)&&(p===0||p===11||p===15)){var m=f.alternate;m?(f.updateQueue=m.updateQueue,f.memoizedState=m.memoizedState,f.lanes=m.lanes):(f.updateQueue=null,f.memoizedState=null)}var g=KE(a);if(g!==null){g.flags&=-257,ZE(g,a,o,s,e),g.mode&1&&QE(s,u,e),e=g,c=u;var y=e.updateQueue;if(y===null){var b=new Set;b.add(c),e.updateQueue=b}else y.add(c);break e}else{if(!(e&1)){QE(s,u,e),vS();break e}c=Error(Ee(426))}}else if(pn&&o.mode&1){var w=KE(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ZE(w,a,o,s,e),J_($u(c,o));break e}}s=c=$u(c,o),Xn!==4&&(Xn=2),Ch===null?Ch=[s]:Ch.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var x=ok(s,c,e);WE(s,x);break e;case 1:o=c;var _=s.type,S=s.stateNode;if(!(s.flags&128)&&(typeof _.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(To===null||!To.has(S)))){s.flags|=65536,e&=-e,s.lanes|=e;var M=lk(s,o,e);WE(s,M);break e}}s=s.return}while(s!==null)}Ek(n)}catch(E){e=E,Hn===n&&n!==null&&(Hn=n=n.return);continue}break}while(!0)}function Mk(){var t=Sx.current;return Sx.current=_x,t===null?_x:t}function vS(){(Xn===0||Xn===3||Xn===2)&&(Xn=4),ai===null||!(ec&268435455)&&!(ay&268435455)||uo(ai,fi)}function Tx(t,e){var n=zt;zt|=2;var i=Mk();(ai!==t||fi!==e)&&(pa=null,zl(t,e));do try{rz();break}catch(r){Ak(t,r)}while(!0);if(tS(),zt=n,Sx.current=i,Hn!==null)throw Error(Ee(261));return ai=null,fi=0,Xn}function rz(){for(;Hn!==null;)Tk(Hn)}function sz(){for(;Hn!==null&&!N5();)Tk(Hn)}function Tk(t){var e=Pk(t.alternate,t,mr);t.memoizedProps=t.pendingProps,e===null?Ek(t):Hn=e,pS.current=null}function Ek(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=ZU(n,e),n!==null){n.flags&=32767,Hn=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Xn=6,Hn=null;return}}else if(n=KU(n,e,mr),n!==null){Hn=n;return}if(e=e.sibling,e!==null){Hn=e;return}Hn=e=t}while(e!==null);Xn===0&&(Xn=5)}function wl(t,e,n){var i=Qt,r=Gr.transition;try{Gr.transition=null,Qt=1,az(t,e,n,i)}finally{Gr.transition=r,Qt=i}return null}function az(t,e,n,i){do Ru();while(vo!==null);if(zt&6)throw Error(Ee(327));n=t.finishedWork;var r=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Ee(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(z5(t,s),t===ai&&(Hn=ai=null,fi=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Tm||(Tm=!0,Nk(ox,function(){return Ru(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Gr.transition,Gr.transition=null;var a=Qt;Qt=1;var o=zt;zt|=4,pS.current=null,ez(t,n),bk(n,t),TU(kb),cx=!!Ib,kb=Ib=null,t.current=n,tz(n),R5(),zt=o,Qt=a,Gr.transition=s}else t.current=n;if(Tm&&(Tm=!1,vo=t,Mx=r),s=t.pendingLanes,s===0&&(To=null),L5(n.stateNode),sr(t,Dn()),e!==null)for(i=t.onRecoverableError,n=0;n<e.length;n++)r=e[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Ax)throw Ax=!1,t=Jb,Jb=null,t;return Mx&1&&t.tag!==0&&Ru(),s=t.pendingLanes,s&1?t===e1?Ph++:(Ph=0,e1=t):Ph=0,Go(),null}function Ru(){if(vo!==null){var t=oI(Mx),e=Gr.transition,n=Qt;try{if(Gr.transition=null,Qt=16>t?16:t,vo===null)var i=!1;else{if(t=vo,vo=null,Mx=0,zt&6)throw Error(Ee(331));var r=zt;for(zt|=4,He=t.current;He!==null;){var s=He,a=s.child;if(He.flags&16){var o=s.deletions;if(o!==null){for(var c=0;c<o.length;c++){var u=o[c];for(He=u;He!==null;){var f=He;switch(f.tag){case 0:case 11:case 15:Eh(8,f,s)}var p=f.child;if(p!==null)p.return=f,He=p;else for(;He!==null;){f=He;var m=f.sibling,g=f.return;if(yk(f),f===u){He=null;break}if(m!==null){m.return=g,He=m;break}He=g}}}var y=s.alternate;if(y!==null){var b=y.child;if(b!==null){y.child=null;do{var w=b.sibling;b.sibling=null,b=w}while(b!==null)}}He=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,He=a;else e:for(;He!==null;){if(s=He,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Eh(9,s,s.return)}var x=s.sibling;if(x!==null){x.return=s.return,He=x;break e}He=s.return}}var _=t.current;for(He=_;He!==null;){a=He;var S=a.child;if(a.subtreeFlags&2064&&S!==null)S.return=a,He=S;else e:for(a=_;He!==null;){if(o=He,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:sy(9,o)}}catch(E){Cn(o,o.return,E)}if(o===a){He=null;break e}var M=o.sibling;if(M!==null){M.return=o.return,He=M;break e}He=o.return}}if(zt=r,Go(),Us&&typeof Us.onPostCommitFiberRoot=="function")try{Us.onPostCommitFiberRoot(Kx,t)}catch{}i=!0}return i}finally{Qt=n,Gr.transition=e}}return!1}function dC(t,e,n){e=$u(n,e),e=ok(t,e,1),t=Mo(t,e,1),e=Bi(),t!==null&&(Hf(t,1,e),sr(t,e))}function Cn(t,e,n){if(t.tag===3)dC(t,t,n);else for(;e!==null;){if(e.tag===3){dC(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(To===null||!To.has(i))){t=$u(n,t),t=lk(e,t,1),e=Mo(e,t,1),t=Bi(),e!==null&&(Hf(e,1,t),sr(e,t));break}}e=e.return}}function oz(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),e=Bi(),t.pingedLanes|=t.suspendedLanes&n,ai===t&&(fi&n)===n&&(Xn===4||Xn===3&&(fi&130023424)===fi&&500>Dn()-gS?zl(t,0):mS|=n),sr(t,e)}function Ck(t,e){e===0&&(t.mode&1?(e=gm,gm<<=1,!(gm&130023424)&&(gm=4194304)):e=1);var n=Bi();t=Ca(t,e),t!==null&&(Hf(t,e,n),sr(t,n))}function lz(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Ck(t,n)}function cz(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(Ee(314))}i!==null&&i.delete(e),Ck(t,n)}var Pk;Pk=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ir.current)nr=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return nr=!1,QU(t,e,n);nr=!!(t.flags&131072)}else nr=!1,pn&&e.flags&1048576&&kI(e,gx,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;zg(t,e),t=e.pendingProps;var r=Wu(e,Ri.current);Nu(e,n),r=cS(null,e,i,t,r,n);var s=uS();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,rr(i)?(s=!0,px(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,rS(e),r.updater=ry,e.stateNode=r,r._reactInternals=e,Vb(e,i,t,n),e=Gb(null,e,i,!0,s,n)):(e.tag=0,pn&&s&&K_(e),Oi(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(zg(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=dz(i),t=is(i,t),r){case 0:e=Wb(null,e,i,t,n);break e;case 1:e=tC(null,e,i,t,n);break e;case 11:e=JE(null,e,i,t,n);break e;case 14:e=eC(null,e,i,is(i.type,t),n);break e}throw Error(Ee(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:is(i,r),Wb(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:is(i,r),tC(t,e,i,r,n);case 3:e:{if(hk(e),t===null)throw Error(Ee(387));i=e.pendingProps,s=e.memoizedState,r=s.element,UI(t,e),vx(e,i,null,n);var a=e.memoizedState;if(i=a.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=$u(Error(Ee(423)),e),e=nC(t,e,i,n,r);break e}else if(i!==r){r=$u(Error(Ee(424)),e),e=nC(t,e,i,n,r);break e}else for(yr=Ao(e.stateNode.containerInfo.firstChild),vr=e,pn=!0,cs=null,n=jI(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gu(),i===r){e=Pa(t,e,n);break e}Oi(t,e,i,n)}e=e.child}return e;case 5:return zI(e),t===null&&Ub(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,a=r.children,Lb(i,r)?a=null:s!==null&&Lb(i,s)&&(e.flags|=32),dk(t,e),Oi(t,e,a,n),e.child;case 6:return t===null&&Ub(e),null;case 13:return fk(t,e,n);case 4:return sS(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=qu(e,null,i,n):Oi(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:is(i,r),JE(t,e,i,r,n);case 7:return Oi(t,e,e.pendingProps,n),e.child;case 8:return Oi(t,e,e.pendingProps.children,n),e.child;case 12:return Oi(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,a=r.value,tn(xx,i._currentValue),i._currentValue=a,s!==null)if(ms(s.value,a)){if(s.children===r.children&&!ir.current){e=Pa(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var c=o.firstContext;c!==null;){if(c.context===i){if(s.tag===1){c=_a(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),zb(s.return,n,e),o.lanes|=n;break}c=c.next}}else if(s.tag===10)a=s.type===e.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Ee(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),zb(a,n,e),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===e){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Oi(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Nu(e,n),r=Xr(r),i=i(r),e.flags|=1,Oi(t,e,i,n),e.child;case 14:return i=e.type,r=is(i,e.pendingProps),r=is(i.type,r),eC(t,e,i,r,n);case 15:return ck(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:is(i,r),zg(t,e),e.tag=1,rr(i)?(t=!0,px(e)):t=!1,Nu(e,n),ak(e,i,r),Vb(e,i,r,n),Gb(null,e,i,!0,t,n);case 19:return pk(t,e,n);case 22:return uk(t,e,n)}throw Error(Ee(156,e.tag))};function Nk(t,e){return iI(t,e)}function uz(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wr(t,e,n,i){return new uz(t,e,n,i)}function wS(t){return t=t.prototype,!(!t||!t.isReactComponent)}function dz(t){if(typeof t=="function")return wS(t)?1:0;if(t!=null){if(t=t.$$typeof,t===U_)return 11;if(t===z_)return 14}return 2}function Co(t,e){var n=t.alternate;return n===null?(n=Wr(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Hg(t,e,n,i,r,s){var a=2;if(i=t,typeof t=="function")wS(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case ru:return Bl(n.children,r,s,e);case O_:a=8,r|=8;break;case hb:return t=Wr(12,n,e,r|2),t.elementType=hb,t.lanes=s,t;case fb:return t=Wr(13,n,e,r),t.elementType=fb,t.lanes=s,t;case pb:return t=Wr(19,n,e,r),t.elementType=pb,t.lanes=s,t;case zR:return oy(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case OR:a=10;break e;case UR:a=9;break e;case U_:a=11;break e;case z_:a=14;break e;case ao:a=16,i=null;break e}throw Error(Ee(130,t==null?t:typeof t,""))}return e=Wr(a,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function Bl(t,e,n,i){return t=Wr(7,t,i,e),t.lanes=n,t}function oy(t,e,n,i){return t=Wr(22,t,i,e),t.elementType=zR,t.lanes=n,t.stateNode={isHidden:!1},t}function H0(t,e,n){return t=Wr(6,t,null,e),t.lanes=n,t}function W0(t,e,n){return e=Wr(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function hz(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=A0(0),this.expirationTimes=A0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=A0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function bS(t,e,n,i,r,s,a,o,c){return t=new hz(t,e,n,o,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Wr(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rS(s),t}function fz(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:iu,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}function Rk(t){if(!t)return Lo;t=t._reactInternals;e:{if(lc(t)!==t||t.tag!==1)throw Error(Ee(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(rr(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Ee(171))}if(t.tag===1){var n=t.type;if(rr(n))return RI(t,n,e)}return e}function Ik(t,e,n,i,r,s,a,o,c){return t=bS(n,i,!0,t,r,s,a,o,c),t.context=Rk(null),n=t.current,i=Bi(),r=Eo(n),s=_a(i,r),s.callback=e??null,Mo(n,s,r),t.current.lanes=r,Hf(t,r,i),sr(t,i),t}function ly(t,e,n,i){var r=e.current,s=Bi(),a=Eo(r);return n=Rk(n),e.context===null?e.context=n:e.pendingContext=n,e=_a(s,a),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),t=Mo(r,e,a),t!==null&&(ps(t,r,a,s),jg(t,r,a)),a}function Ex(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function hC(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function _S(t,e){hC(t,e),(t=t.alternate)&&hC(t,e)}function pz(){return null}var kk=typeof reportError=="function"?reportError:function(t){console.error(t)};function SS(t){this._internalRoot=t}cy.prototype.render=SS.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Ee(409));ly(t,e,null,null)};cy.prototype.unmount=SS.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;tc(function(){ly(null,t,null,null)}),e[Ea]=null}};function cy(t){this._internalRoot=t}cy.prototype.unstable_scheduleHydration=function(t){if(t){var e=uI();t={blockedOn:null,target:t,priority:e};for(var n=0;n<co.length&&e!==0&&e<co[n].priority;n++);co.splice(n,0,t),n===0&&hI(t)}};function AS(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function uy(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function fC(){}function mz(t,e,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var u=Ex(a);s.call(u)}}var a=Ik(e,i,t,0,null,!1,!1,"",fC);return t._reactRootContainer=a,t[Ea]=a.current,Yh(t.nodeType===8?t.parentNode:t),tc(),a}for(;r=t.lastChild;)t.removeChild(r);if(typeof i=="function"){var o=i;i=function(){var u=Ex(c);o.call(u)}}var c=bS(t,0,!1,null,null,!1,!1,"",fC);return t._reactRootContainer=c,t[Ea]=c.current,Yh(t.nodeType===8?t.parentNode:t),tc(function(){ly(e,c,n,i)}),c}function dy(t,e,n,i,r){var s=n._reactRootContainer;if(s){var a=s;if(typeof r=="function"){var o=r;r=function(){var c=Ex(a);o.call(c)}}ly(e,a,t,r)}else a=mz(n,e,t,r,i);return Ex(a)}lI=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=mh(e.pendingLanes);n!==0&&(H_(e,n|1),sr(e,Dn()),!(zt&6)&&(Yu=Dn()+500,Go()))}break;case 13:tc(function(){var i=Ca(t,1);if(i!==null){var r=Bi();ps(i,t,1,r)}}),_S(t,1)}};W_=function(t){if(t.tag===13){var e=Ca(t,134217728);if(e!==null){var n=Bi();ps(e,t,134217728,n)}_S(t,134217728)}};cI=function(t){if(t.tag===13){var e=Eo(t),n=Ca(t,e);if(n!==null){var i=Bi();ps(n,t,e,i)}_S(t,e)}};uI=function(){return Qt};dI=function(t,e){var n=Qt;try{return Qt=t,e()}finally{Qt=n}};Ab=function(t,e,n){switch(e){case"input":if(xb(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=ty(i);if(!r)throw Error(Ee(90));VR(i),xb(i,r)}}}break;case"textarea":WR(t,n);break;case"select":e=n.value,e!=null&&Tu(t,!!n.multiple,e,!1)}};KR=xS;ZR=tc;var gz={usingClientEntryPoint:!1,Events:[Gf,lu,ty,YR,QR,xS]},Qd={findFiberByHostInstance:Tl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xz={bundleType:Qd.bundleType,version:Qd.version,rendererPackageName:Qd.rendererPackageName,rendererConfig:Qd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fa.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=tI(t),t===null?null:t.stateNode},findFiberByHostInstance:Qd.findFiberByHostInstance||pz,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 Em=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Em.isDisabled&&Em.supportsFiber)try{Kx=Em.inject(xz),Us=Em}catch{}}Tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gz;Tr.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!AS(e))throw Error(Ee(200));return fz(t,e,null,n)};Tr.createRoot=function(t,e){if(!AS(t))throw Error(Ee(299));var n=!1,i="",r=kk;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=bS(t,1,!1,null,null,n,!1,i,r),t[Ea]=e.current,Yh(t.nodeType===8?t.parentNode:t),new SS(e)};Tr.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Ee(188)):(t=Object.keys(t).join(","),Error(Ee(268,t)));return t=tI(e),t=t===null?null:t.stateNode,t};Tr.flushSync=function(t){return tc(t)};Tr.hydrate=function(t,e,n){if(!uy(e))throw Error(Ee(200));return dy(null,t,e,!0,n)};Tr.hydrateRoot=function(t,e,n){if(!AS(t))throw Error(Ee(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",a=kk;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),e=Ik(e,null,t,1,n??null,r,!1,s,a),t[Ea]=e.current,Yh(t),i)for(t=0;t<i.length;t++)n=i[t],r=n._getVersion,r=r(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,r]:e.mutableSourceEagerHydrationData.push(n,r);return new cy(e)};Tr.render=function(t,e,n){if(!uy(e))throw Error(Ee(200));return dy(null,t,e,!1,n)};Tr.unmountComponentAtNode=function(t){if(!uy(t))throw Error(Ee(40));return t._reactRootContainer?(tc(function(){dy(null,null,t,!1,function(){t._reactRootContainer=null,t[Ea]=null})}),!0):!1};Tr.unstable_batchedUpdates=xS;Tr.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!uy(n))throw Error(Ee(200));if(t==null||t._reactInternals===void 0)throw Error(Ee(38));return dy(t,e,n,!1,i)};Tr.version="18.3.1-next-f1338f8080-20240426";function Lk(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lk)}catch(t){console.error(t)}}Lk(),LR.exports=Tr;var Xf=LR.exports;const hy=P_(Xf);var Dk,pC=Xf;Dk=pC.createRoot,pC.hydrateRoot;const yz=1,vz=1e6;let G0=0;function wz(){return G0=(G0+1)%Number.MAX_SAFE_INTEGER,G0.toString()}const q0=new Map,mC=t=>{if(q0.has(t))return;const e=setTimeout(()=>{q0.delete(t),Nh({type:"REMOVE_TOAST",toastId:t})},vz);q0.set(t,e)},bz=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,yz)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?mC(n):t.toasts.forEach(i=>{mC(i.id)}),{...t,toasts:t.toasts.map(i=>i.id===n||n===void 0?{...i,open:!1}:i)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Wg=[];let Gg={toasts:[]};function Nh(t){Gg=bz(Gg,t),Wg.forEach(e=>{e(Gg)})}function _z({...t}){const e=wz(),n=r=>Nh({type:"UPDATE_TOAST",toast:{...r,id:e}}),i=()=>Nh({type:"DISMISS_TOAST",toastId:e});return Nh({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:r=>{r||i()}}}),{id:e,dismiss:i,update:n}}function Sz(){const[t,e]=I.useState(Gg);return I.useEffect(()=>(Wg.push(e),()=>{const n=Wg.indexOf(e);n>-1&&Wg.splice(n,1)}),[t]),{...t,toast:_z,dismiss:n=>Nh({type:"DISMISS_TOAST",toastId:n})}}function Fn(t,e,{checkForDefaultPrevented:n=!0}={}){return function(r){if(t==null||t(r),n===!1||!r.defaultPrevented)return e==null?void 0:e(r)}}function gC(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Fk(...t){return e=>{let n=!1;const i=t.map(r=>{const s=gC(r,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():gC(t[r],null)}}}}function Ar(...t){return I.useCallback(Fk(...t),t)}function ud(t,e=[]){let n=[];function i(s,a){const o=I.createContext(a),c=n.length;n=[...n,a];const u=p=>{var x;const{scope:m,children:g,...y}=p,b=((x=m==null?void 0:m[t])==null?void 0:x[c])||o,w=I.useMemo(()=>y,Object.values(y));return l.jsx(b.Provider,{value:w,children:g})};u.displayName=s+"Provider";function f(p,m){var b;const g=((b=m==null?void 0:m[t])==null?void 0:b[c])||o,y=I.useContext(g);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const r=()=>{const s=n.map(a=>I.createContext(a));return function(o){const c=(o==null?void 0:o[t])||s;return I.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return r.scopeName=t,[i,Az(r,...e)]}function Az(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=i.reduce((o,{useScope:c,scopeName:u})=>{const p=c(s)[`__scope${u}`];return{...o,...p}},{});return I.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function i1(t){const e=Mz(t),n=I.forwardRef((i,r)=>{const{children:s,...a}=i,o=I.Children.toArray(s),c=o.find(Ez);if(c){const u=c.props.children,f=o.map(p=>p===c?I.Children.count(u)>1?I.Children.only(null):I.isValidElement(u)?u.props.children:null:p);return l.jsx(e,{...a,ref:r,children:I.isValidElement(u)?I.cloneElement(u,void 0,f):null})}return l.jsx(e,{...a,ref:r,children:s})});return n.displayName=`${t}.Slot`,n}function Mz(t){const e=I.forwardRef((n,i)=>{const{children:r,...s}=n;if(I.isValidElement(r)){const a=Pz(r),o=Cz(s,r.props);return r.type!==I.Fragment&&(o.ref=i?Fk(i,a):a),I.cloneElement(r,o)}return I.Children.count(r)>1?I.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var jk=Symbol("radix.slottable");function Tz(t){const e=({children:n})=>l.jsx(l.Fragment,{children:n});return e.displayName=`${t}.Slottable`,e.__radixId=jk,e}function Ez(t){return I.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jk}function Cz(t,e){const n={...e};for(const i in e){const r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...o)=>{const c=s(...o);return r(...o),c}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"&&(n[i]=[r,s].filter(Boolean).join(" "))}return{...t,...n}}function Pz(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Ok(t){const e=t+"CollectionProvider",[n,i]=ud(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:w,children:x}=b,_=Ae.useRef(null),S=Ae.useRef(new Map).current;return l.jsx(r,{scope:w,itemMap:S,collectionRef:_,children:x})};a.displayName=e;const o=t+"CollectionSlot",c=i1(o),u=Ae.forwardRef((b,w)=>{const{scope:x,children:_}=b,S=s(o,x),M=Ar(w,S.collectionRef);return l.jsx(c,{ref:M,children:_})});u.displayName=o;const f=t+"CollectionItemSlot",p="data-radix-collection-item",m=i1(f),g=Ae.forwardRef((b,w)=>{const{scope:x,children:_,...S}=b,M=Ae.useRef(null),E=Ar(w,M),C=s(f,x);return Ae.useEffect(()=>(C.itemMap.set(M,{ref:M,...S}),()=>void C.itemMap.delete(M))),l.jsx(m,{[p]:"",ref:E,children:_})});g.displayName=f;function y(b){const w=s(t+"CollectionConsumer",b);return Ae.useCallback(()=>{const _=w.collectionRef.current;if(!_)return[];const S=Array.from(_.querySelectorAll(`[${p}]`));return Array.from(w.itemMap.values()).sort((C,N)=>S.indexOf(C.ref.current)-S.indexOf(N.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:a,Slot:u,ItemSlot:g},y,i]}var Nz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Kn=Nz.reduce((t,e)=>{const n=i1(`Primitive.${e}`),i=I.forwardRef((r,s)=>{const{asChild:a,...o}=r,c=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:s})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function Uk(t,e){t&&Xf.flushSync(()=>t.dispatchEvent(e))}function Do(t){const e=I.useRef(t);return I.useEffect(()=>{e.current=t}),I.useMemo(()=>(...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)},[])}function Rz(t,e=globalThis==null?void 0:globalThis.document){const n=Do(t);I.useEffect(()=>{const i=r=>{r.key==="Escape"&&n(r)};return e.addEventListener("keydown",i,{capture:!0}),()=>e.removeEventListener("keydown",i,{capture:!0})},[n,e])}var Iz="DismissableLayer",r1="dismissableLayer.update",kz="dismissableLayer.pointerDownOutside",Lz="dismissableLayer.focusOutside",xC,zk=I.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),MS=I.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...c}=t,u=I.useContext(zk),[f,p]=I.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=I.useState({}),y=Ar(e,N=>p(N)),b=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=b.indexOf(w),_=f?b.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,M=_>=x,E=Fz(N=>{const D=N.target,R=[...u.branches].some(k=>k.contains(D));!M||R||(r==null||r(N),a==null||a(N),N.defaultPrevented||o==null||o())},m),C=jz(N=>{const D=N.target;[...u.branches].some(k=>k.contains(D))||(s==null||s(N),a==null||a(N),N.defaultPrevented||o==null||o())},m);return Rz(N=>{_===u.layers.size-1&&(i==null||i(N),!N.defaultPrevented&&o&&(N.preventDefault(),o()))},m),I.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(xC=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),yC(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=xC)}},[f,m,n,u]),I.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),yC())},[f,u]),I.useEffect(()=>{const N=()=>g({});return document.addEventListener(r1,N),()=>document.removeEventListener(r1,N)},[]),l.jsx(Kn.div,{...c,ref:y,style:{pointerEvents:S?M?"auto":"none":void 0,...t.style},onFocusCapture:Fn(t.onFocusCapture,C.onFocusCapture),onBlurCapture:Fn(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Fn(t.onPointerDownCapture,E.onPointerDownCapture)})});MS.displayName=Iz;var Dz="DismissableLayerBranch",Bk=I.forwardRef((t,e)=>{const n=I.useContext(zk),i=I.useRef(null),r=Ar(e,i);return I.useEffect(()=>{const s=i.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),l.jsx(Kn.div,{...t,ref:r})});Bk.displayName=Dz;function Fz(t,e=globalThis==null?void 0:globalThis.document){const n=Do(t),i=I.useRef(!1),r=I.useRef(()=>{});return I.useEffect(()=>{const s=o=>{if(o.target&&!i.current){let c=function(){Vk(kz,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",r.current),r.current=c,e.addEventListener("click",r.current,{once:!0})):c()}else e.removeEventListener("click",r.current);i.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",r.current)}},[e,n]),{onPointerDownCapture:()=>i.current=!0}}function jz(t,e=globalThis==null?void 0:globalThis.document){const n=Do(t),i=I.useRef(!1);return I.useEffect(()=>{const r=s=>{s.target&&!i.current&&Vk(Lz,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function yC(){const t=new CustomEvent(r1);document.dispatchEvent(t)}function Vk(t,e,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?Uk(r,s):r.dispatchEvent(s)}var Oz=MS,Uz=Bk,Xs=globalThis!=null&&globalThis.document?I.useLayoutEffect:()=>{},zz="Portal",Hk=I.forwardRef((t,e)=>{var o;const{container:n,...i}=t,[r,s]=I.useState(!1);Xs(()=>s(!0),[]);const a=n||r&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?hy.createPortal(l.jsx(Kn.div,{...i,ref:e}),a):null});Hk.displayName=zz;function Bz(t,e){return I.useReducer((n,i)=>e[n][i]??n,t)}var fy=t=>{const{present:e,children:n}=t,i=Vz(e),r=typeof n=="function"?n({present:i.isPresent}):I.Children.only(n),s=Ar(i.ref,Hz(r));return typeof n=="function"||i.isPresent?I.cloneElement(r,{ref:s}):null};fy.displayName="Presence";function Vz(t){const[e,n]=I.useState(),i=I.useRef(null),r=I.useRef(t),s=I.useRef("none"),a=t?"mounted":"unmounted",[o,c]=Bz(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return I.useEffect(()=>{const u=Cm(i.current);s.current=o==="mounted"?u:"none"},[o]),Xs(()=>{const u=i.current,f=r.current;if(f!==t){const m=s.current,g=Cm(u);t?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,c]),Xs(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,p=g=>{const b=Cm(i.current).includes(g.animationName);if(g.target===e&&b&&(c("ANIMATION_END"),!r.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},m=g=>{g.target===e&&(s.current=Cm(i.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",p),e.addEventListener("animationend",p),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",p),e.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:I.useCallback(u=>{i.current=u?getComputedStyle(u):null,n(u)},[])}}function Cm(t){return(t==null?void 0:t.animationName)||"none"}function Hz(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Wz=L_[" useInsertionEffect ".trim().toString()]||Xs;function $f({prop:t,defaultProp:e,onChange:n=()=>{},caller:i}){const[r,s,a]=Gz({defaultProp:e,onChange:n}),o=t!==void 0,c=o?t:r;{const f=I.useRef(t!==void 0);I.useEffect(()=>{const p=f.current;p!==o&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,i])}const u=I.useCallback(f=>{var p;if(o){const m=qz(f)?f(t):f;m!==t&&((p=a.current)==null||p.call(a,m))}else s(f)},[o,t,s,a]);return[c,u]}function Gz({defaultProp:t,onChange:e}){const[n,i]=I.useState(t),r=I.useRef(n),s=I.useRef(e);return Wz(()=>{s.current=e},[e]),I.useEffect(()=>{var a;r.current!==n&&((a=s.current)==null||a.call(s,n),r.current=n)},[n,r]),[n,i,s]}function qz(t){return typeof t=="function"}var Xz=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),$z="VisuallyHidden",py=I.forwardRef((t,e)=>l.jsx(Kn.span,{...t,ref:e,style:{...Xz,...t.style}}));py.displayName=$z;var Yz=py,TS="ToastProvider",[ES,Qz,Kz]=Ok("Toast"),[Wk,Bre]=ud("Toast",[Kz]),[Zz,my]=Wk(TS),Gk=t=>{const{__scopeToast:e,label:n="Notification",duration:i=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:a}=t,[o,c]=I.useState(null),[u,f]=I.useState(0),p=I.useRef(!1),m=I.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${TS}\`. Expected non-empty \`string\`.`),l.jsx(ES.Provider,{scope:e,children:l.jsx(Zz,{scope:e,label:n,duration:i,swipeDirection:r,swipeThreshold:s,toastCount:u,viewport:o,onViewportChange:c,onToastAdd:I.useCallback(()=>f(g=>g+1),[]),onToastRemove:I.useCallback(()=>f(g=>g-1),[]),isFocusedToastEscapeKeyDownRef:p,isClosePausedRef:m,children:a})})};Gk.displayName=TS;var qk="ToastViewport",Jz=["F8"],s1="toast.viewportPause",a1="toast.viewportResume",Xk=I.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:i=Jz,label:r="Notifications ({hotkey})",...s}=t,a=my(qk,n),o=Qz(n),c=I.useRef(null),u=I.useRef(null),f=I.useRef(null),p=I.useRef(null),m=Ar(e,p,a.onViewportChange),g=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=a.toastCount>0;I.useEffect(()=>{const w=x=>{var S;i.length!==0&&i.every(M=>x[M]||x.code===M)&&((S=p.current)==null||S.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[i]),I.useEffect(()=>{const w=c.current,x=p.current;if(y&&w&&x){const _=()=>{if(!a.isClosePausedRef.current){const C=new CustomEvent(s1);x.dispatchEvent(C),a.isClosePausedRef.current=!0}},S=()=>{if(a.isClosePausedRef.current){const C=new CustomEvent(a1);x.dispatchEvent(C),a.isClosePausedRef.current=!1}},M=C=>{!w.contains(C.relatedTarget)&&S()},E=()=>{w.contains(document.activeElement)||S()};return w.addEventListener("focusin",_),w.addEventListener("focusout",M),w.addEventListener("pointermove",_),w.addEventListener("pointerleave",E),window.addEventListener("blur",_),window.addEventListener("focus",S),()=>{w.removeEventListener("focusin",_),w.removeEventListener("focusout",M),w.removeEventListener("pointermove",_),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",_),window.removeEventListener("focus",S)}}},[y,a.isClosePausedRef]);const b=I.useCallback(({tabbingDirection:w})=>{const _=o().map(S=>{const M=S.ref.current,E=[M,...hB(M)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?_.reverse():_).flat()},[o]);return I.useEffect(()=>{const w=p.current;if(w){const x=_=>{var E,C,N;const S=_.altKey||_.ctrlKey||_.metaKey;if(_.key==="Tab"&&!S){const D=document.activeElement,R=_.shiftKey;if(_.target===w&&R){(E=u.current)==null||E.focus();return}const G=b({tabbingDirection:R?"backwards":"forwards"}),ie=G.findIndex(z=>z===D);X0(G.slice(ie+1))?_.preventDefault():R?(C=u.current)==null||C.focus():(N=f.current)==null||N.focus()}};return w.addEventListener("keydown",x),()=>w.removeEventListener("keydown",x)}},[o,b]),l.jsxs(Uz,{ref:c,role:"region","aria-label":r.replace("{hotkey}",g),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&l.jsx(o1,{ref:u,onFocusFromOutsideViewport:()=>{const w=b({tabbingDirection:"forwards"});X0(w)}}),l.jsx(ES.Slot,{scope:n,children:l.jsx(Kn.ol,{tabIndex:-1,...s,ref:m})}),y&&l.jsx(o1,{ref:f,onFocusFromOutsideViewport:()=>{const w=b({tabbingDirection:"backwards"});X0(w)}})]})});Xk.displayName=qk;var $k="ToastFocusProxy",o1=I.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:i,...r}=t,s=my($k,n);return l.jsx(py,{"aria-hidden":!0,tabIndex:0,...r,ref:e,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=s.viewport)!=null&&u.contains(o))&&i()}})});o1.displayName=$k;var Yf="Toast",eB="toast.swipeStart",tB="toast.swipeMove",nB="toast.swipeCancel",iB="toast.swipeEnd",Yk=I.forwardRef((t,e)=>{const{forceMount:n,open:i,defaultOpen:r,onOpenChange:s,...a}=t,[o,c]=$f({prop:i,defaultProp:r??!0,onChange:s,caller:Yf});return l.jsx(fy,{present:n||o,children:l.jsx(aB,{open:o,...a,ref:e,onClose:()=>c(!1),onPause:Do(t.onPause),onResume:Do(t.onResume),onSwipeStart:Fn(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Fn(t.onSwipeMove,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${p}px`)}),onSwipeCancel:Fn(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Fn(t.onSwipeEnd,u=>{const{x:f,y:p}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${p}px`),c(!1)})})})});Yk.displayName=Yf;var[rB,sB]=Wk(Yf,{onClose(){}}),aB=I.forwardRef((t,e)=>{const{__scopeToast:n,type:i="foreground",duration:r,open:s,onClose:a,onEscapeKeyDown:o,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:g,...y}=t,b=my(Yf,n),[w,x]=I.useState(null),_=Ar(e,z=>x(z)),S=I.useRef(null),M=I.useRef(null),E=r||b.duration,C=I.useRef(0),N=I.useRef(E),D=I.useRef(0),{onToastAdd:R,onToastRemove:k}=b,V=Do(()=>{var $;(w==null?void 0:w.contains(document.activeElement))&&(($=b.viewport)==null||$.focus()),a()}),G=I.useCallback(z=>{!z||z===1/0||(window.clearTimeout(D.current),C.current=new Date().getTime(),D.current=window.setTimeout(V,z))},[V]);I.useEffect(()=>{const z=b.viewport;if(z){const $=()=>{G(N.current),u==null||u()},X=()=>{const ee=new Date().getTime()-C.current;N.current=N.current-ee,window.clearTimeout(D.current),c==null||c()};return z.addEventListener(s1,X),z.addEventListener(a1,$),()=>{z.removeEventListener(s1,X),z.removeEventListener(a1,$)}}},[b.viewport,E,c,u,G]),I.useEffect(()=>{s&&!b.isClosePausedRef.current&&G(E)},[s,E,b.isClosePausedRef,G]),I.useEffect(()=>(R(),()=>k()),[R,k]);const ie=I.useMemo(()=>w?n3(w):null,[w]);return b.viewport?l.jsxs(l.Fragment,{children:[ie&&l.jsx(oB,{__scopeToast:n,role:"status","aria-live":i==="foreground"?"assertive":"polite","aria-atomic":!0,children:ie}),l.jsx(rB,{scope:n,onClose:V,children:Xf.createPortal(l.jsx(ES.ItemSlot,{scope:n,children:l.jsx(Oz,{asChild:!0,onEscapeKeyDown:Fn(o,()=>{b.isFocusedToastEscapeKeyDownRef.current||V(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Kn.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":b.swipeDirection,...y,ref:_,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:Fn(t.onKeyDown,z=>{z.key==="Escape"&&(o==null||o(z.nativeEvent),z.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,V()))}),onPointerDown:Fn(t.onPointerDown,z=>{z.button===0&&(S.current={x:z.clientX,y:z.clientY})}),onPointerMove:Fn(t.onPointerMove,z=>{if(!S.current)return;const $=z.clientX-S.current.x,X=z.clientY-S.current.y,ee=!!M.current,L=["left","right"].includes(b.swipeDirection),j=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,B=L?j(0,$):0,Y=L?0:j(0,X),Z=z.pointerType==="touch"?10:2,K={x:B,y:Y},se={originalEvent:z,delta:K};ee?(M.current=K,Pm(tB,p,se,{discrete:!1})):vC(K,b.swipeDirection,Z)?(M.current=K,Pm(eB,f,se,{discrete:!1}),z.target.setPointerCapture(z.pointerId)):(Math.abs($)>Z||Math.abs(X)>Z)&&(S.current=null)}),onPointerUp:Fn(t.onPointerUp,z=>{const $=M.current,X=z.target;if(X.hasPointerCapture(z.pointerId)&&X.releasePointerCapture(z.pointerId),M.current=null,S.current=null,$){const ee=z.currentTarget,L={originalEvent:z,delta:$};vC($,b.swipeDirection,b.swipeThreshold)?Pm(iB,g,L,{discrete:!0}):Pm(nB,m,L,{discrete:!0}),ee.addEventListener("click",j=>j.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),oB=t=>{const{__scopeToast:e,children:n,...i}=t,r=my(Yf,e),[s,a]=I.useState(!1),[o,c]=I.useState(!1);return uB(()=>a(!0)),I.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:l.jsx(Hk,{asChild:!0,children:l.jsx(py,{...i,children:s&&l.jsxs(l.Fragment,{children:[r.label," ",n]})})})},lB="ToastTitle",Qk=I.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t;return l.jsx(Kn.div,{...i,ref:e})});Qk.displayName=lB;var cB="ToastDescription",Kk=I.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t;return l.jsx(Kn.div,{...i,ref:e})});Kk.displayName=cB;var Zk="ToastAction",Jk=I.forwardRef((t,e)=>{const{altText:n,...i}=t;return n.trim()?l.jsx(t3,{altText:n,asChild:!0,children:l.jsx(CS,{...i,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Zk}\`. Expected non-empty \`string\`.`),null)});Jk.displayName=Zk;var e3="ToastClose",CS=I.forwardRef((t,e)=>{const{__scopeToast:n,...i}=t,r=sB(e3,n);return l.jsx(t3,{asChild:!0,children:l.jsx(Kn.button,{type:"button",...i,ref:e,onClick:Fn(t.onClick,r.onClose)})})});CS.displayName=e3;var t3=I.forwardRef((t,e)=>{const{__scopeToast:n,altText:i,...r}=t;return l.jsx(Kn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0,...r,ref:e})});function n3(t){const e=[];return Array.from(t.childNodes).forEach(i=>{if(i.nodeType===i.TEXT_NODE&&i.textContent&&e.push(i.textContent),dB(i)){const r=i.ariaHidden||i.hidden||i.style.display==="none",s=i.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const a=i.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...n3(i))}}),e}function Pm(t,e,n,{discrete:i}){const r=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?Uk(r,s):r.dispatchEvent(s)}var vC=(t,e,n=0)=>{const i=Math.abs(t.x),r=Math.abs(t.y),s=i>r;return e==="left"||e==="right"?s&&i>n:!s&&r>n};function uB(t=()=>{}){const e=Do(t);Xs(()=>{let n=0,i=0;return n=window.requestAnimationFrame(()=>i=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(i)}},[e])}function dB(t){return t.nodeType===t.ELEMENT_NODE}function hB(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function X0(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var fB=Gk,i3=Xk,r3=Yk,s3=Qk,a3=Kk,o3=Jk,l3=CS;function c3(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var r=t.length;for(e=0;e<r;e++)t[e]&&(n=c3(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function u3(){for(var t,e,n=0,i="",r=arguments.length;n<r;n++)(t=arguments[n])&&(e=c3(t))&&(i&&(i+=" "),i+=e);return i}const wC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,bC=u3,pB=(t,e)=>n=>{var i;if((e==null?void 0:e.variants)==null)return bC(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=e,a=Object.keys(r).map(u=>{const f=n==null?void 0:n[u],p=s==null?void 0:s[u];if(f===null)return null;const m=wC(f)||wC(p);return r[u][m]}),o=n&&Object.entries(n).reduce((u,f)=>{let[p,m]=f;return m===void 0||(u[p]=m),u},{}),c=e==null||(i=e.compoundVariants)===null||i===void 0?void 0:i.reduce((u,f)=>{let{class:p,className:m,...g}=f;return Object.entries(g).every(y=>{let[b,w]=y;return Array.isArray(w)?w.includes({...s,...o}[b]):{...s,...o}[b]===w})?[...u,p,m]:u},[]);return bC(t,a,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const mB=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),d3=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/var gB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xB=I.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:s,iconNode:a,...o},c)=>I.createElement("svg",{ref:c,...gB,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:d3("lucide",r),...o},[...a.map(([u,f])=>I.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Ft=(t,e)=>{const n=I.forwardRef(({className:i,...r},s)=>I.createElement(xB,{ref:s,iconNode:e,className:d3(`lucide-${mB(t)}`,i),...r}));return n.displayName=`${t}`,n};/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yB=Ft("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kt=Ft("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const $0=Ft("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const qr=Ft("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const h3=Ft("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const vB=Ft("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const f3=Ft("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const wB=Ft("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const p3=Ft("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const m3=Ft("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const g3=Ft("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const bB=Ft("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const x3=Ft("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const _B=Ft("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const SB=Ft("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y3=Ft("Headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const AB=Ft("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const MB=Ft("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const TB=Ft("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const v3=Ft("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const EB=Ft("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const CB=Ft("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const gy=Ft("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PB=Ft("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const NB=Ft("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const RB=Ft("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const xy=Ft("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const IB=Ft("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const yy=Ft("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const kB=Ft("SearchCheck",[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const PS=Ft("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const LB=Ft("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const DB=Ft("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const nc=Ft("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const sf=Ft("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),NS="-",FB=t=>{const e=OB(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:a=>{const o=a.split(NS);return o[0]===""&&o.length!==1&&o.shift(),w3(o,e)||jB(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&i[a]?[...c,...i[a]]:c}}},w3=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const n=t[0],i=e.nextPart.get(n),r=i?w3(t.slice(1),i):void 0;if(r)return r;if(e.validators.length===0)return;const s=t.join(NS);return(a=e.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},_C=/^\[(.+)\]$/,jB=t=>{if(_C.test(t)){const e=_C.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},OB=t=>{const{theme:e,prefix:n}=t,i={nextPart:new Map,validators:[]};return zB(Object.entries(t.classGroups),n).forEach(([s,a])=>{l1(a,i,s,e)}),i},l1=(t,e,n,i)=>{t.forEach(r=>{if(typeof r=="string"){const s=r===""?e:SC(e,r);s.classGroupId=n;return}if(typeof r=="function"){if(UB(r)){l1(r(i),e,n,i);return}e.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,a])=>{l1(a,SC(e,s),n,i)})})},SC=(t,e)=>{let n=t;return e.split(NS).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},UB=t=>t.isThemeGetter,zB=(t,e)=>e?t.map(([n,i])=>{const r=i.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[e+a,o])):s);return[n,r]}):t,BB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,i=new Map;const r=(s,a)=>{n.set(s,a),e++,e>t&&(e=0,i=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=i.get(s))!==void 0)return r(s,a),a},set(s,a){n.has(s)?n.set(s,a):r(s,a)}}},b3="!",VB=t=>{const{separator:e,experimentalParseClassName:n}=t,i=e.length===1,r=e[0],s=e.length,a=o=>{const c=[];let u=0,f=0,p;for(let w=0;w<o.length;w++){let x=o[w];if(u===0){if(x===r&&(i||o.slice(w,w+s)===e)){c.push(o.slice(f,w)),f=w+s;continue}if(x==="/"){p=w;continue}}x==="["?u++:x==="]"&&u--}const m=c.length===0?o:o.substring(f),g=m.startsWith(b3),y=g?m.substring(1):m,b=p&&p>f?p-f:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:b}};return n?o=>n({className:o,parseClassName:a}):a},HB=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(i=>{i[0]==="["?(e.push(...n.sort(),i),n=[]):n.push(i)}),e.push(...n.sort()),e},WB=t=>({cache:BB(t.cacheSize),parseClassName:VB(t),...FB(t)}),GB=/\s+/,qB=(t,e)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:r}=e,s=[],a=t.trim().split(GB);let o="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=n(u);let y=!!g,b=i(y?m.substring(0,g):m);if(!b){if(!y){o=u+(o.length>0?" "+o:o);continue}if(b=i(m),!b){o=u+(o.length>0?" "+o:o);continue}y=!1}const w=HB(f).join(":"),x=p?w+b3:w,_=x+b;if(s.includes(_))continue;s.push(_);const S=r(b,y);for(let M=0;M<S.length;++M){const E=S[M];s.push(x+E)}o=u+(o.length>0?" "+o:o)}return o};function XB(){let t=0,e,n,i="";for(;t<arguments.length;)(e=arguments[t++])&&(n=_3(e))&&(i&&(i+=" "),i+=n);return i}const _3=t=>{if(typeof t=="string")return t;let e,n="";for(let i=0;i<t.length;i++)t[i]&&(e=_3(t[i]))&&(n&&(n+=" "),n+=e);return n};function $B(t,...e){let n,i,r,s=a;function a(c){const u=e.reduce((f,p)=>p(f),t());return n=WB(u),i=n.cache.get,r=n.cache.set,s=o,o(c)}function o(c){const u=i(c);if(u)return u;const f=qB(c,n);return r(c,f),f}return function(){return s(XB.apply(null,arguments))}}const sn=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},S3=/^\[(?:([a-z-]+):)?(.+)\]$/i,YB=/^\d+\/\d+$/,QB=new Set(["px","full","screen"]),KB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZB=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,JB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,e6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,t6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sa=t=>Iu(t)||QB.has(t)||YB.test(t),Ya=t=>dd(t,"length",c6),Iu=t=>!!t&&!Number.isNaN(Number(t)),Y0=t=>dd(t,"number",Iu),Kd=t=>!!t&&Number.isInteger(Number(t)),n6=t=>t.endsWith("%")&&Iu(t.slice(0,-1)),Mt=t=>S3.test(t),Qa=t=>KB.test(t),i6=new Set(["length","size","percentage"]),r6=t=>dd(t,i6,A3),s6=t=>dd(t,"position",A3),a6=new Set(["image","url"]),o6=t=>dd(t,a6,d6),l6=t=>dd(t,"",u6),Zd=()=>!0,dd=(t,e,n)=>{const i=S3.exec(t);return i?i[1]?typeof e=="string"?i[1]===e:e.has(i[1]):n(i[2]):!1},c6=t=>ZB.test(t)&&!JB.test(t),A3=()=>!1,u6=t=>e6.test(t),d6=t=>t6.test(t),h6=()=>{const t=sn("colors"),e=sn("spacing"),n=sn("blur"),i=sn("brightness"),r=sn("borderColor"),s=sn("borderRadius"),a=sn("borderSpacing"),o=sn("borderWidth"),c=sn("contrast"),u=sn("grayscale"),f=sn("hueRotate"),p=sn("invert"),m=sn("gap"),g=sn("gradientColorStops"),y=sn("gradientColorStopPositions"),b=sn("inset"),w=sn("margin"),x=sn("opacity"),_=sn("padding"),S=sn("saturate"),M=sn("scale"),E=sn("sepia"),C=sn("skew"),N=sn("space"),D=sn("translate"),R=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",Mt,e],G=()=>[Mt,e],ie=()=>["",sa,Ya],z=()=>["auto",Iu,Mt],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],ee=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",Mt],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>[Iu,Mt];return{cacheSize:500,separator:":",theme:{colors:[Zd],spacing:[sa,Ya],blur:["none","",Qa,Mt],brightness:Y(),borderColor:[t],borderRadius:["none","","full",Qa,Mt],borderSpacing:G(),borderWidth:ie(),contrast:Y(),grayscale:j(),hueRotate:Y(),invert:j(),gap:G(),gradientColorStops:[t],gradientColorStopPositions:[n6,Ya],inset:V(),margin:V(),opacity:Y(),padding:G(),saturate:Y(),scale:Y(),sepia:j(),skew:Y(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",Mt]}],container:["container"],columns:[{columns:[Qa]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Mt]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kd,Mt]}],basis:[{basis:V()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Mt]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",Kd,Mt]}],"grid-cols":[{"grid-cols":[Zd]}],"col-start-end":[{col:["auto",{span:["full",Kd,Mt]},Mt]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Zd]}],"row-start-end":[{row:["auto",{span:[Kd,Mt]},Mt]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Mt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Mt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Mt,e]}],"min-w":[{"min-w":[Mt,e,"min","max","fit"]}],"max-w":[{"max-w":[Mt,e,"none","full","min","max","fit","prose",{screen:[Qa]},Qa]}],h:[{h:[Mt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Mt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Mt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Mt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Qa,Ya]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y0]}],"font-family":[{font:[Zd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Mt]}],"line-clamp":[{"line-clamp":["none",Iu,Y0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sa,Mt]}],"list-image":[{"list-image":["none",Mt]}],"list-style-type":[{list:["none","disc","decimal",Mt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sa,Ya]}],"underline-offset":[{"underline-offset":["auto",sa,Mt]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Mt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Mt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),s6]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",r6]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},o6]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:X()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[sa,Mt]}],"outline-w":[{outline:[sa,Ya]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[sa,Ya]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Qa,l6]}],"shadow-color":[{shadow:[Zd]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...ee(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ee()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Qa,Mt]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Mt]}],duration:[{duration:Y()}],ease:[{ease:["linear","in","out","in-out",Mt]}],delay:[{delay:Y()}],animate:[{animate:["none","spin","ping","pulse","bounce",Mt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[Kd,Mt]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Mt]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Mt]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Mt]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[sa,Ya,Y0]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},f6=$B(h6);function oi(...t){return f6(u3(t))}const p6=fB,M3=I.forwardRef(({className:t,...e},n)=>l.jsx(i3,{ref:n,className:oi("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));M3.displayName=i3.displayName;const m6=pB("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),T3=I.forwardRef(({className:t,variant:e,...n},i)=>l.jsx(r3,{ref:i,className:oi(m6({variant:e}),t),...n}));T3.displayName=r3.displayName;const g6=I.forwardRef(({className:t,...e},n)=>l.jsx(o3,{ref:n,className:oi("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",t),...e}));g6.displayName=o3.displayName;const E3=I.forwardRef(({className:t,...e},n)=>l.jsx(l3,{ref:n,className:oi("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:l.jsx(nc,{className:"h-4 w-4"})}));E3.displayName=l3.displayName;const C3=I.forwardRef(({className:t,...e},n)=>l.jsx(s3,{ref:n,className:oi("text-sm font-semibold",t),...e}));C3.displayName=s3.displayName;const P3=I.forwardRef(({className:t,...e},n)=>l.jsx(a3,{ref:n,className:oi("text-sm opacity-90",t),...e}));P3.displayName=a3.displayName;function x6(){const{toasts:t}=Sz();return l.jsxs(p6,{children:[t.map(function({id:e,title:n,description:i,action:r,...s}){return l.jsxs(T3,{...s,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(C3,{children:n}),i&&l.jsx(P3,{children:i})]}),r,l.jsx(E3,{})]},e)}),l.jsx(M3,{})]})}var AC=["light","dark"],y6="(prefers-color-scheme: dark)",v6=I.createContext(void 0),w6={setTheme:t=>{},themes:[]},b6=()=>{var t;return(t=I.useContext(v6))!=null?t:w6};I.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:i,enableColorScheme:r,defaultTheme:s,value:a,attrs:o,nonce:c})=>{let u=s==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,p=r?AC.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(y,b=!1,w=!0)=>{let x=a?a[y]:y,_=b?y+"|| ''":`'${x}'`,S="";return r&&w&&!b&&AC.includes(y)&&(S+=`d.style.colorScheme = '${y}';`),n==="class"?b||x?S+=`c.add(${_})`:S+="null":x&&(S+=`d[s](n,${_})`),S},g=t?`!function(){${f}${m(t)}}()`:i?`!function(){try{${f}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${u})){var t='${y6}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${m(a?"x[e]":"e",!0)}}${u?"":"else{"+m(s,!1,!1)+"}"}${p}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${e}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${m(a?"x[e]":"e",!0)}}else{${m(s,!1,!1)};}${p}}catch(t){}}();`;return I.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:g}})});var _6=t=>{switch(t){case"success":return M6;case"info":return E6;case"warning":return T6;case"error":return C6;default:return null}},S6=Array(12).fill(0),A6=({visible:t,className:e})=>Ae.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},Ae.createElement("div",{className:"sonner-spinner"},S6.map((n,i)=>Ae.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),M6=Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Ae.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"})),T6=Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Ae.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"})),E6=Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Ae.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"})),C6=Ae.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Ae.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"})),P6=Ae.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"},Ae.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ae.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),N6=()=>{let[t,e]=Ae.useState(document.hidden);return Ae.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},c1=1,R6=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:n,...i}=t,r=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:c1++,s=this.toasts.find(o=>o.id===r),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),s?this.toasts=this.toasts.map(o=>o.id===r?(this.publish({...o,...t,id:r,title:n}),{...o,...t,id:r,dismissible:a,title:n}):o):this.addToast({title:n,...i,dismissible:a,id:r}),r},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(n=>n({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let n;e.loading!==void 0&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let i=t instanceof Promise?t:t(),r=n!==void 0,s,a=i.then(async c=>{if(s=["resolve",c],Ae.isValidElement(c))r=!1,this.create({id:n,type:"default",message:c});else if(k6(c)&&!c.ok){r=!1;let u=typeof e.error=="function"?await e.error(`HTTP error! status: ${c.status}`):e.error,f=typeof e.description=="function"?await e.description(`HTTP error! status: ${c.status}`):e.description;this.create({id:n,type:"error",message:u,description:f})}else if(e.success!==void 0){r=!1;let u=typeof e.success=="function"?await e.success(c):e.success,f=typeof e.description=="function"?await e.description(c):e.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(s=["reject",c],e.error!==void 0){r=!1;let u=typeof e.error=="function"?await e.error(c):e.error,f=typeof e.description=="function"?await e.description(c):e.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;r&&(this.dismiss(n),n=void 0),(c=e.finally)==null||c.call(e)}),o=()=>new Promise((c,u)=>a.then(()=>s[0]==="reject"?u(s[1]):c(s[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})},this.custom=(t,e)=>{let n=(e==null?void 0:e.id)||c1++;return this.create({jsx:t(n),id:n,...e}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Zi=new R6,I6=(t,e)=>{let n=(e==null?void 0:e.id)||c1++;return Zi.addToast({title:t,...e,id:n}),n},k6=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",L6=I6,D6=()=>Zi.toasts,F6=()=>Zi.getActiveToasts();Object.assign(L6,{success:Zi.success,info:Zi.info,warning:Zi.warning,error:Zi.error,custom:Zi.custom,message:Zi.message,promise:Zi.promise,dismiss:Zi.dismiss,loading:Zi.loading},{getHistory:D6,getToasts:F6});function j6(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}j6(`:where(html[dir="ltr"]),:where([data-sonner-toaster][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%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][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%)}:where([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:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([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);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([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 #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([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)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([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;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([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);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-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([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}:where([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}:where([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, 0px)) translate(var(--swipe-amount-x, 0px));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{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{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{0%{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-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--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-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-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-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, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--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-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-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],[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],[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],[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],[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:nth-child(1){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)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{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 Nm(t){return t.label!==void 0}var O6=3,U6="32px",z6="16px",MC=4e3,B6=356,V6=14,H6=20,W6=200;function Zr(...t){return t.filter(Boolean).join(" ")}function G6(t){let[e,n]=t.split("-"),i=[];return e&&i.push(e),n&&i.push(n),i}var q6=t=>{var e,n,i,r,s,a,o,c,u,f,p;let{invert:m,toast:g,unstyled:y,interacting:b,setHeights:w,visibleToasts:x,heights:_,index:S,toasts:M,expanded:E,removeToast:C,defaultRichColors:N,closeButton:D,style:R,cancelButtonStyle:k,actionButtonStyle:V,className:G="",descriptionClassName:ie="",duration:z,position:$,gap:X,loadingIcon:ee,expandByDefault:L,classNames:j,icons:B,closeButtonAriaLabel:Y="Close toast",pauseWhenPageIsHidden:Z}=t,[K,se]=Ae.useState(null),[ge,Ce]=Ae.useState(null),[xe,nt]=Ae.useState(!1),[it,ze]=Ae.useState(!1),[Xe,q]=Ae.useState(!1),[_e,fe]=Ae.useState(!1),[Te,he]=Ae.useState(!1),[Qe,De]=Ae.useState(0),[O,F]=Ae.useState(0),ne=Ae.useRef(g.duration||z||MC),Se=Ae.useRef(null),ve=Ae.useRef(null),we=S===0,$e=S+1<=x,Pe=g.type,je=g.dismissible!==!1,st=g.className||"",gt=g.descriptionClassName||"",be=Ae.useMemo(()=>_.findIndex(Me=>Me.toastId===g.id)||0,[_,g.id]),Dt=Ae.useMemo(()=>{var Me;return(Me=g.closeButton)!=null?Me:D},[g.closeButton,D]),St=Ae.useMemo(()=>g.duration||z||MC,[g.duration,z]),ut=Ae.useRef(0),Ke=Ae.useRef(0),Ve=Ae.useRef(0),dt=Ae.useRef(null),[jt,Jt]=$.split("-"),vt=Ae.useMemo(()=>_.reduce((Me,Je,rt)=>rt>=be?Me:Me+Je.height,0),[_,be]),Re=N6(),Q=g.invert||m,Le=Pe==="loading";Ke.current=Ae.useMemo(()=>be*X+vt,[be,vt]),Ae.useEffect(()=>{ne.current=St},[St]),Ae.useEffect(()=>{nt(!0)},[]),Ae.useEffect(()=>{let Me=ve.current;if(Me){let Je=Me.getBoundingClientRect().height;return F(Je),w(rt=>[{toastId:g.id,height:Je,position:g.position},...rt]),()=>w(rt=>rt.filter(Ot=>Ot.toastId!==g.id))}},[w,g.id]),Ae.useLayoutEffect(()=>{if(!xe)return;let Me=ve.current,Je=Me.style.height;Me.style.height="auto";let rt=Me.getBoundingClientRect().height;Me.style.height=Je,F(rt),w(Ot=>Ot.find(Xt=>Xt.toastId===g.id)?Ot.map(Xt=>Xt.toastId===g.id?{...Xt,height:rt}:Xt):[{toastId:g.id,height:rt,position:g.position},...Ot])},[xe,g.title,g.description,w,g.id]);let Ie=Ae.useCallback(()=>{ze(!0),De(Ke.current),w(Me=>Me.filter(Je=>Je.toastId!==g.id)),setTimeout(()=>{C(g)},W6)},[g,C,w,Ke]);Ae.useEffect(()=>{if(g.promise&&Pe==="loading"||g.duration===1/0||g.type==="loading")return;let Me;return E||b||Z&&Re?(()=>{if(Ve.current<ut.current){let Je=new Date().getTime()-ut.current;ne.current=ne.current-Je}Ve.current=new Date().getTime()})():ne.current!==1/0&&(ut.current=new Date().getTime(),Me=setTimeout(()=>{var Je;(Je=g.onAutoClose)==null||Je.call(g,g),Ie()},ne.current)),()=>clearTimeout(Me)},[E,b,g,Pe,Z,Re,Ie]),Ae.useEffect(()=>{g.delete&&Ie()},[Ie,g.delete]);function ot(){var Me,Je,rt;return B!=null&&B.loading?Ae.createElement("div",{className:Zr(j==null?void 0:j.loader,(Me=g==null?void 0:g.classNames)==null?void 0:Me.loader,"sonner-loader"),"data-visible":Pe==="loading"},B.loading):ee?Ae.createElement("div",{className:Zr(j==null?void 0:j.loader,(Je=g==null?void 0:g.classNames)==null?void 0:Je.loader,"sonner-loader"),"data-visible":Pe==="loading"},ee):Ae.createElement(A6,{className:Zr(j==null?void 0:j.loader,(rt=g==null?void 0:g.classNames)==null?void 0:rt.loader),visible:Pe==="loading"})}return Ae.createElement("li",{tabIndex:0,ref:ve,className:Zr(G,st,j==null?void 0:j.toast,(e=g==null?void 0:g.classNames)==null?void 0:e.toast,j==null?void 0:j.default,j==null?void 0:j[Pe],(n=g==null?void 0:g.classNames)==null?void 0:n[Pe]),"data-sonner-toast":"","data-rich-colors":(i=g.richColors)!=null?i:N,"data-styled":!(g.jsx||g.unstyled||y),"data-mounted":xe,"data-promise":!!g.promise,"data-swiped":Te,"data-removed":it,"data-visible":$e,"data-y-position":jt,"data-x-position":Jt,"data-index":S,"data-front":we,"data-swiping":Xe,"data-dismissible":je,"data-type":Pe,"data-invert":Q,"data-swipe-out":_e,"data-swipe-direction":ge,"data-expanded":!!(E||L&&xe),style:{"--index":S,"--toasts-before":S,"--z-index":M.length-S,"--offset":`${it?Qe:Ke.current}px`,"--initial-height":L?"auto":`${O}px`,...R,...g.style},onDragEnd:()=>{q(!1),se(null),dt.current=null},onPointerDown:Me=>{Le||!je||(Se.current=new Date,De(Ke.current),Me.target.setPointerCapture(Me.pointerId),Me.target.tagName!=="BUTTON"&&(q(!0),dt.current={x:Me.clientX,y:Me.clientY}))},onPointerUp:()=>{var Me,Je,rt,Ot;if(_e||!je)return;dt.current=null;let Xt=Number(((Me=ve.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),It=Number(((Je=ve.current)==null?void 0:Je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),nn=new Date().getTime()-((rt=Se.current)==null?void 0:rt.getTime()),hn=K==="x"?Xt:It,Xi=Math.abs(hn)/nn;if(Math.abs(hn)>=H6||Xi>.11){De(Ke.current),(Ot=g.onDismiss)==null||Ot.call(g,g),Ce(K==="x"?Xt>0?"right":"left":It>0?"down":"up"),Ie(),fe(!0),he(!1);return}q(!1),se(null)},onPointerMove:Me=>{var Je,rt,Ot,Xt;if(!dt.current||!je||((Je=window.getSelection())==null?void 0:Je.toString().length)>0)return;let It=Me.clientY-dt.current.y,nn=Me.clientX-dt.current.x,hn=(rt=t.swipeDirections)!=null?rt:G6($);!K&&(Math.abs(nn)>1||Math.abs(It)>1)&&se(Math.abs(nn)>Math.abs(It)?"x":"y");let Xi={x:0,y:0};K==="y"?(hn.includes("top")||hn.includes("bottom"))&&(hn.includes("top")&&It<0||hn.includes("bottom")&&It>0)&&(Xi.y=It):K==="x"&&(hn.includes("left")||hn.includes("right"))&&(hn.includes("left")&&nn<0||hn.includes("right")&&nn>0)&&(Xi.x=nn),(Math.abs(Xi.x)>0||Math.abs(Xi.y)>0)&&he(!0),(Ot=ve.current)==null||Ot.style.setProperty("--swipe-amount-x",`${Xi.x}px`),(Xt=ve.current)==null||Xt.style.setProperty("--swipe-amount-y",`${Xi.y}px`)}},Dt&&!g.jsx?Ae.createElement("button",{"aria-label":Y,"data-disabled":Le,"data-close-button":!0,onClick:Le||!je?()=>{}:()=>{var Me;Ie(),(Me=g.onDismiss)==null||Me.call(g,g)},className:Zr(j==null?void 0:j.closeButton,(r=g==null?void 0:g.classNames)==null?void 0:r.closeButton)},(s=B==null?void 0:B.close)!=null?s:P6):null,g.jsx||I.isValidElement(g.title)?g.jsx?g.jsx:typeof g.title=="function"?g.title():g.title:Ae.createElement(Ae.Fragment,null,Pe||g.icon||g.promise?Ae.createElement("div",{"data-icon":"",className:Zr(j==null?void 0:j.icon,(a=g==null?void 0:g.classNames)==null?void 0:a.icon)},g.promise||g.type==="loading"&&!g.icon?g.icon||ot():null,g.type!=="loading"?g.icon||(B==null?void 0:B[Pe])||_6(Pe):null):null,Ae.createElement("div",{"data-content":"",className:Zr(j==null?void 0:j.content,(o=g==null?void 0:g.classNames)==null?void 0:o.content)},Ae.createElement("div",{"data-title":"",className:Zr(j==null?void 0:j.title,(c=g==null?void 0:g.classNames)==null?void 0:c.title)},typeof g.title=="function"?g.title():g.title),g.description?Ae.createElement("div",{"data-description":"",className:Zr(ie,gt,j==null?void 0:j.description,(u=g==null?void 0:g.classNames)==null?void 0:u.description)},typeof g.description=="function"?g.description():g.description):null),I.isValidElement(g.cancel)?g.cancel:g.cancel&&Nm(g.cancel)?Ae.createElement("button",{"data-button":!0,"data-cancel":!0,style:g.cancelButtonStyle||k,onClick:Me=>{var Je,rt;Nm(g.cancel)&&je&&((rt=(Je=g.cancel).onClick)==null||rt.call(Je,Me),Ie())},className:Zr(j==null?void 0:j.cancelButton,(f=g==null?void 0:g.classNames)==null?void 0:f.cancelButton)},g.cancel.label):null,I.isValidElement(g.action)?g.action:g.action&&Nm(g.action)?Ae.createElement("button",{"data-button":!0,"data-action":!0,style:g.actionButtonStyle||V,onClick:Me=>{var Je,rt;Nm(g.action)&&((rt=(Je=g.action).onClick)==null||rt.call(Je,Me),!Me.defaultPrevented&&Ie())},className:Zr(j==null?void 0:j.actionButton,(p=g==null?void 0:g.classNames)==null?void 0:p.actionButton)},g.action.label):null))};function TC(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function X6(t,e){let n={};return[t,e].forEach((i,r)=>{let s=r===1,a=s?"--mobile-offset":"--offset",o=s?z6:U6;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof i=="number"||typeof i=="string"?c(i):typeof i=="object"?["top","right","bottom","left"].forEach(u=>{i[u]===void 0?n[`${a}-${u}`]=o:n[`${a}-${u}`]=typeof i[u]=="number"?`${i[u]}px`:i[u]}):c(o)}),n}var $6=I.forwardRef(function(t,e){let{invert:n,position:i="bottom-right",hotkey:r=["altKey","KeyT"],expand:s,closeButton:a,className:o,offset:c,mobileOffset:u,theme:f="light",richColors:p,duration:m,style:g,visibleToasts:y=O6,toastOptions:b,dir:w=TC(),gap:x=V6,loadingIcon:_,icons:S,containerAriaLabel:M="Notifications",pauseWhenPageIsHidden:E}=t,[C,N]=Ae.useState([]),D=Ae.useMemo(()=>Array.from(new Set([i].concat(C.filter(Z=>Z.position).map(Z=>Z.position)))),[C,i]),[R,k]=Ae.useState([]),[V,G]=Ae.useState(!1),[ie,z]=Ae.useState(!1),[$,X]=Ae.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=Ae.useRef(null),L=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),j=Ae.useRef(null),B=Ae.useRef(!1),Y=Ae.useCallback(Z=>{N(K=>{var se;return(se=K.find(ge=>ge.id===Z.id))!=null&&se.delete||Zi.dismiss(Z.id),K.filter(({id:ge})=>ge!==Z.id)})},[]);return Ae.useEffect(()=>Zi.subscribe(Z=>{if(Z.dismiss){N(K=>K.map(se=>se.id===Z.id?{...se,delete:!0}:se));return}setTimeout(()=>{hy.flushSync(()=>{N(K=>{let se=K.findIndex(ge=>ge.id===Z.id);return se!==-1?[...K.slice(0,se),{...K[se],...Z},...K.slice(se+1)]:[Z,...K]})})})}),[]),Ae.useEffect(()=>{if(f!=="system"){X(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;let Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:K})=>{X(K?"dark":"light")})}catch{Z.addListener(({matches:se})=>{try{X(se?"dark":"light")}catch(ge){console.error(ge)}})}},[f]),Ae.useEffect(()=>{C.length<=1&&G(!1)},[C]),Ae.useEffect(()=>{let Z=K=>{var se,ge;r.every(Ce=>K[Ce]||K.code===Ce)&&(G(!0),(se=ee.current)==null||se.focus()),K.code==="Escape"&&(document.activeElement===ee.current||(ge=ee.current)!=null&&ge.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[r]),Ae.useEffect(()=>{if(ee.current)return()=>{j.current&&(j.current.focus({preventScroll:!0}),j.current=null,B.current=!1)}},[ee.current]),Ae.createElement("section",{ref:e,"aria-label":`${M} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((Z,K)=>{var se;let[ge,Ce]=Z.split("-");return C.length?Ae.createElement("ol",{key:Z,dir:w==="auto"?TC():w,tabIndex:-1,ref:ee,className:o,"data-sonner-toaster":!0,"data-theme":$,"data-y-position":ge,"data-lifted":V&&C.length>1&&!s,"data-x-position":Ce,style:{"--front-toast-height":`${((se=R[0])==null?void 0:se.height)||0}px`,"--width":`${B6}px`,"--gap":`${x}px`,...g,...X6(c,u)},onBlur:xe=>{B.current&&!xe.currentTarget.contains(xe.relatedTarget)&&(B.current=!1,j.current&&(j.current.focus({preventScroll:!0}),j.current=null))},onFocus:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||B.current||(B.current=!0,j.current=xe.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{ie||G(!1)},onDragEnd:()=>G(!1),onPointerDown:xe=>{xe.target instanceof HTMLElement&&xe.target.dataset.dismissible==="false"||z(!0)},onPointerUp:()=>z(!1)},C.filter(xe=>!xe.position&&K===0||xe.position===Z).map((xe,nt)=>{var it,ze;return Ae.createElement(q6,{key:xe.id,icons:S,index:nt,toast:xe,defaultRichColors:p,duration:(it=b==null?void 0:b.duration)!=null?it:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:n,visibleToasts:y,closeButton:(ze=b==null?void 0:b.closeButton)!=null?ze:a,interacting:ie,position:Z,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,removeToast:Y,toasts:C.filter(Xe=>Xe.position==xe.position),heights:R.filter(Xe=>Xe.position==xe.position),setHeights:k,expandByDefault:s,gap:x,loadingIcon:_,expanded:V,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const Y6=({...t})=>{const{theme:e="system"}=b6();return l.jsx($6,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var Q6=L_[" useId ".trim().toString()]||(()=>{}),K6=0;function RS(t){const[e,n]=I.useState(Q6());return Xs(()=>{n(i=>i??String(K6++))},[t]),e?`radix-${e}`:""}const Z6=["top","right","bottom","left"],Fo=Math.min,gr=Math.max,Cx=Math.round,Rm=Math.floor,Bs=t=>({x:t,y:t}),J6={left:"right",right:"left",bottom:"top",top:"bottom"},e8={start:"end",end:"start"};function u1(t,e,n){return gr(t,Fo(e,n))}function Na(t,e){return typeof t=="function"?t(e):t}function Ra(t){return t.split("-")[0]}function hd(t){return t.split("-")[1]}function IS(t){return t==="x"?"y":"x"}function kS(t){return t==="y"?"height":"width"}const t8=new Set(["top","bottom"]);function Os(t){return t8.has(Ra(t))?"y":"x"}function LS(t){return IS(Os(t))}function n8(t,e,n){n===void 0&&(n=!1);const i=hd(t),r=LS(t),s=kS(r);let a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Px(a)),[a,Px(a)]}function i8(t){const e=Px(t);return[d1(t),e,d1(e)]}function d1(t){return t.replace(/start|end/g,e=>e8[e])}const EC=["left","right"],CC=["right","left"],r8=["top","bottom"],s8=["bottom","top"];function a8(t,e,n){switch(t){case"top":case"bottom":return n?e?CC:EC:e?EC:CC;case"left":case"right":return e?r8:s8;default:return[]}}function o8(t,e,n,i){const r=hd(t);let s=a8(Ra(t),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),e&&(s=s.concat(s.map(d1)))),s}function Px(t){return t.replace(/left|right|bottom|top/g,e=>J6[e])}function l8(t){return{top:0,right:0,bottom:0,left:0,...t}}function N3(t){return typeof t!="number"?l8(t):{top:t,right:t,bottom:t,left:t}}function Nx(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function PC(t,e,n){let{reference:i,floating:r}=t;const s=Os(e),a=LS(e),o=kS(a),c=Ra(e),u=s==="y",f=i.x+i.width/2-r.width/2,p=i.y+i.height/2-r.height/2,m=i[o]/2-r[o]/2;let g;switch(c){case"top":g={x:f,y:i.y-r.height};break;case"bottom":g={x:f,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:p};break;case"left":g={x:i.x-r.width,y:p};break;default:g={x:i.x,y:i.y}}switch(hd(e)){case"start":g[a]-=m*(n&&u?-1:1);break;case"end":g[a]+=m*(n&&u?-1:1);break}return g}const c8=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:p}=PC(u,i,c),m=i,g={},y=0;for(let b=0;b<o.length;b++){const{name:w,fn:x}=o[b],{x:_,y:S,data:M,reset:E}=await x({x:f,y:p,initialPlacement:i,placement:m,strategy:r,middlewareData:g,rects:u,platform:a,elements:{reference:t,floating:e}});f=_??f,p=S??p,g={...g,[w]:{...g[w],...M}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:r}):E.rects),{x:f,y:p}=PC(u,m,c)),b=-1)}return{x:f,y:p,placement:m,strategy:r,middlewareData:g}};async function af(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:a,elements:o,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=Na(e,t),y=N3(g),w=o[m?p==="floating"?"reference":"floating":p],x=Nx(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:u,rootBoundary:f,strategy:c})),_=p==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),M=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},E=Nx(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:_,offsetParent:S,strategy:c}):_);return{top:(x.top-E.top+y.top)/M.y,bottom:(E.bottom-x.bottom+y.bottom)/M.y,left:(x.left-E.left+y.left)/M.x,right:(E.right-x.right+y.right)/M.x}}const u8=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:a,elements:o,middlewareData:c}=e,{element:u,padding:f=0}=Na(t,e)||{};if(u==null)return{};const p=N3(f),m={x:n,y:i},g=LS(r),y=kS(g),b=await a.getDimensions(u),w=g==="y",x=w?"top":"left",_=w?"bottom":"right",S=w?"clientHeight":"clientWidth",M=s.reference[y]+s.reference[g]-m[g]-s.floating[y],E=m[g]-s.reference[g],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let N=C?C[S]:0;(!N||!await(a.isElement==null?void 0:a.isElement(C)))&&(N=o.floating[S]||s.floating[y]);const D=M/2-E/2,R=N/2-b[y]/2-1,k=Fo(p[x],R),V=Fo(p[_],R),G=k,ie=N-b[y]-V,z=N/2-b[y]/2+D,$=u1(G,z,ie),X=!c.arrow&&hd(r)!=null&&z!==$&&s.reference[y]/2-(z<G?k:V)-b[y]/2<0,ee=X?z<G?z-G:z-ie:0;return{[g]:m[g]+ee,data:{[g]:$,centerOffset:z-$-ee,...X&&{alignmentOffset:ee}},reset:X}}}),d8=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:o,platform:c,elements:u}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:b=!0,...w}=Na(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=Ra(r),_=Os(o),S=Ra(o)===o,M=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=m||(S||!b?[Px(o)]:i8(o)),C=y!=="none";!m&&C&&E.push(...o8(o,b,y,M));const N=[o,...E],D=await af(e,w),R=[];let k=((i=s.flip)==null?void 0:i.overflows)||[];if(f&&R.push(D[x]),p){const z=n8(r,a,M);R.push(D[z[0]],D[z[1]])}if(k=[...k,{placement:r,overflows:R}],!R.every(z=>z<=0)){var V,G;const z=(((V=s.flip)==null?void 0:V.index)||0)+1,$=N[z];if($&&(!(p==="alignment"?_!==Os($):!1)||k.every(L=>L.overflows[0]>0&&Os(L.placement)===_)))return{data:{index:z,overflows:k},reset:{placement:$}};let X=(G=k.filter(ee=>ee.overflows[0]<=0).sort((ee,L)=>ee.overflows[1]-L.overflows[1])[0])==null?void 0:G.placement;if(!X)switch(g){case"bestFit":{var ie;const ee=(ie=k.filter(L=>{if(C){const j=Os(L.placement);return j===_||j==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(j=>j>0).reduce((j,B)=>j+B,0)]).sort((L,j)=>L[1]-j[1])[0])==null?void 0:ie[0];ee&&(X=ee);break}case"initialPlacement":X=o;break}if(r!==X)return{reset:{placement:X}}}return{}}}};function NC(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function RC(t){return Z6.some(e=>t[e]>=0)}const h8=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:i="referenceHidden",...r}=Na(t,e);switch(i){case"referenceHidden":{const s=await af(e,{...r,elementContext:"reference"}),a=NC(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:RC(a)}}}case"escaped":{const s=await af(e,{...r,altBoundary:!0}),a=NC(s,n.floating);return{data:{escapedOffsets:a,escaped:RC(a)}}}default:return{}}}}},R3=new Set(["left","top"]);async function f8(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=Ra(n),o=hd(n),c=Os(n)==="y",u=R3.has(a)?-1:1,f=s&&c?-1:1,p=Na(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:y}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return o&&typeof y=="number"&&(g=o==="end"?y*-1:y),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const p8=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:a,middlewareData:o}=e,c=await f8(e,t);return a===((n=o.offset)==null?void 0:n.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:r+c.x,y:s+c.y,data:{...c,placement:a}}}}},m8=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:w=>{let{x,y:_}=w;return{x,y:_}}},...c}=Na(t,e),u={x:n,y:i},f=await af(e,c),p=Os(Ra(r)),m=IS(p);let g=u[m],y=u[p];if(s){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",_=g+f[w],S=g-f[x];g=u1(_,g,S)}if(a){const w=p==="y"?"top":"left",x=p==="y"?"bottom":"right",_=y+f[w],S=y-f[x];y=u1(_,y,S)}const b=o.fn({...e,[m]:g,[p]:y});return{...b,data:{x:b.x-n,y:b.y-i,enabled:{[m]:s,[p]:a}}}}}},g8=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:i,placement:r,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=Na(t,e),f={x:n,y:i},p=Os(r),m=IS(p);let g=f[m],y=f[p];const b=Na(o,e),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const S=m==="y"?"height":"width",M=s.reference[m]-s.floating[S]+w.mainAxis,E=s.reference[m]+s.reference[S]-w.mainAxis;g<M?g=M:g>E&&(g=E)}if(u){var x,_;const S=m==="y"?"width":"height",M=R3.has(Ra(r)),E=s.reference[p]-s.floating[S]+(M&&((x=a.offset)==null?void 0:x[p])||0)+(M?0:w.crossAxis),C=s.reference[p]+s.reference[S]+(M?0:((_=a.offset)==null?void 0:_[p])||0)-(M?w.crossAxis:0);y<E?y=E:y>C&&(y=C)}return{[m]:g,[p]:y}}}},x8=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,i;const{placement:r,rects:s,platform:a,elements:o}=e,{apply:c=()=>{},...u}=Na(t,e),f=await af(e,u),p=Ra(r),m=hd(r),g=Os(r)==="y",{width:y,height:b}=s.floating;let w,x;p==="top"||p==="bottom"?(w=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(x=p,w=m==="end"?"top":"bottom");const _=b-f.top-f.bottom,S=y-f.left-f.right,M=Fo(b-f[w],_),E=Fo(y-f[x],S),C=!e.middlewareData.shift;let N=M,D=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(D=S),(i=e.middlewareData.shift)!=null&&i.enabled.y&&(N=_),C&&!m){const k=gr(f.left,0),V=gr(f.right,0),G=gr(f.top,0),ie=gr(f.bottom,0);g?D=y-2*(k!==0||V!==0?k+V:gr(f.left,f.right)):N=b-2*(G!==0||ie!==0?G+ie:gr(f.top,f.bottom))}await c({...e,availableWidth:D,availableHeight:N});const R=await a.getDimensions(o.floating);return y!==R.width||b!==R.height?{reset:{rects:!0}}:{}}}};function vy(){return typeof window<"u"}function fd(t){return I3(t)?(t.nodeName||"").toLowerCase():"#document"}function wr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ks(t){var e;return(e=(I3(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function I3(t){return vy()?t instanceof Node||t instanceof wr(t).Node:!1}function gs(t){return vy()?t instanceof Element||t instanceof wr(t).Element:!1}function $s(t){return vy()?t instanceof HTMLElement||t instanceof wr(t).HTMLElement:!1}function IC(t){return!vy()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof wr(t).ShadowRoot}const y8=new Set(["inline","contents"]);function Qf(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=xs(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!y8.has(r)}const v8=new Set(["table","td","th"]);function w8(t){return v8.has(fd(t))}const b8=[":popover-open",":modal"];function wy(t){return b8.some(e=>{try{return t.matches(e)}catch{return!1}})}const _8=["transform","translate","scale","rotate","perspective"],S8=["transform","translate","scale","rotate","perspective","filter"],A8=["paint","layout","strict","content"];function DS(t){const e=FS(),n=gs(t)?xs(t):t;return _8.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||S8.some(i=>(n.willChange||"").includes(i))||A8.some(i=>(n.contain||"").includes(i))}function M8(t){let e=jo(t);for(;$s(e)&&!Qu(e);){if(DS(e))return e;if(wy(e))return null;e=jo(e)}return null}function FS(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const T8=new Set(["html","body","#document"]);function Qu(t){return T8.has(fd(t))}function xs(t){return wr(t).getComputedStyle(t)}function by(t){return gs(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function jo(t){if(fd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||IC(t)&&t.host||Ks(t);return IC(e)?e.host:e}function k3(t){const e=jo(t);return Qu(e)?t.ownerDocument?t.ownerDocument.body:t.body:$s(e)&&Qf(e)?e:k3(e)}function of(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=k3(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),a=wr(r);if(s){const o=h1(a);return e.concat(a,a.visualViewport||[],Qf(r)?r:[],o&&n?of(o):[])}return e.concat(r,of(r,[],n))}function h1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function L3(t){const e=xs(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=$s(t),s=r?t.offsetWidth:n,a=r?t.offsetHeight:i,o=Cx(n)!==s||Cx(i)!==a;return o&&(n=s,i=a),{width:n,height:i,$:o}}function jS(t){return gs(t)?t:t.contextElement}function ku(t){const e=jS(t);if(!$s(e))return Bs(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=L3(e);let a=(s?Cx(n.width):n.width)/i,o=(s?Cx(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const E8=Bs(0);function D3(t){const e=wr(t);return!FS()||!e.visualViewport?E8:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function C8(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==wr(t)?!1:e}function ic(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=jS(t);let a=Bs(1);e&&(i?gs(i)&&(a=ku(i)):a=ku(t));const o=C8(s,n,i)?D3(s):Bs(0);let c=(r.left+o.x)/a.x,u=(r.top+o.y)/a.y,f=r.width/a.x,p=r.height/a.y;if(s){const m=wr(s),g=i&&gs(i)?wr(i):i;let y=m,b=h1(y);for(;b&&i&&g!==y;){const w=ku(b),x=b.getBoundingClientRect(),_=xs(b),S=x.left+(b.clientLeft+parseFloat(_.paddingLeft))*w.x,M=x.top+(b.clientTop+parseFloat(_.paddingTop))*w.y;c*=w.x,u*=w.y,f*=w.x,p*=w.y,c+=S,u+=M,y=wr(b),b=h1(y)}}return Nx({width:f,height:p,x:c,y:u})}function OS(t,e){const n=by(t).scrollLeft;return e?e.left+n:ic(Ks(t)).left+n}function F3(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:OS(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function P8(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",a=Ks(i),o=e?wy(e.floating):!1;if(i===a||o&&s)return n;let c={scrollLeft:0,scrollTop:0},u=Bs(1);const f=Bs(0),p=$s(i);if((p||!p&&!s)&&((fd(i)!=="body"||Qf(a))&&(c=by(i)),$s(i))){const g=ic(i);u=ku(i),f.x=g.x+i.clientLeft,f.y=g.y+i.clientTop}const m=a&&!p&&!s?F3(a,c,!0):Bs(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:n.y*u.y-c.scrollTop*u.y+f.y+m.y}}function N8(t){return Array.from(t.getClientRects())}function R8(t){const e=Ks(t),n=by(t),i=t.ownerDocument.body,r=gr(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=gr(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+OS(t);const o=-n.scrollTop;return xs(i).direction==="rtl"&&(a+=gr(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:a,y:o}}function I8(t,e){const n=wr(t),i=Ks(t),r=n.visualViewport;let s=i.clientWidth,a=i.clientHeight,o=0,c=0;if(r){s=r.width,a=r.height;const u=FS();(!u||u&&e==="fixed")&&(o=r.offsetLeft,c=r.offsetTop)}return{width:s,height:a,x:o,y:c}}const k8=new Set(["absolute","fixed"]);function L8(t,e){const n=ic(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=$s(t)?ku(t):Bs(1),a=t.clientWidth*s.x,o=t.clientHeight*s.y,c=r*s.x,u=i*s.y;return{width:a,height:o,x:c,y:u}}function kC(t,e,n){let i;if(e==="viewport")i=I8(t,n);else if(e==="document")i=R8(Ks(t));else if(gs(e))i=L8(e,n);else{const r=D3(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Nx(i)}function j3(t,e){const n=jo(t);return n===e||!gs(n)||Qu(n)?!1:xs(n).position==="fixed"||j3(n,e)}function D8(t,e){const n=e.get(t);if(n)return n;let i=of(t,[],!1).filter(o=>gs(o)&&fd(o)!=="body"),r=null;const s=xs(t).position==="fixed";let a=s?jo(t):t;for(;gs(a)&&!Qu(a);){const o=xs(a),c=DS(a);!c&&o.position==="fixed"&&(r=null),(s?!c&&!r:!c&&o.position==="static"&&!!r&&k8.has(r.position)||Qf(a)&&!c&&j3(t,a))?i=i.filter(f=>f!==a):r=o,a=jo(a)}return e.set(t,i),i}function F8(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const a=[...n==="clippingAncestors"?wy(e)?[]:D8(e,this._c):[].concat(n),i],o=a[0],c=a.reduce((u,f)=>{const p=kC(e,f,r);return u.top=gr(p.top,u.top),u.right=Fo(p.right,u.right),u.bottom=Fo(p.bottom,u.bottom),u.left=gr(p.left,u.left),u},kC(e,o,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function j8(t){const{width:e,height:n}=L3(t);return{width:e,height:n}}function O8(t,e,n){const i=$s(e),r=Ks(e),s=n==="fixed",a=ic(t,!0,s,e);let o={scrollLeft:0,scrollTop:0};const c=Bs(0);function u(){c.x=OS(r)}if(i||!i&&!s)if((fd(e)!=="body"||Qf(r))&&(o=by(e)),i){const g=ic(e,!0,s,e);c.x=g.x+e.clientLeft,c.y=g.y+e.clientTop}else r&&u();s&&!i&&r&&u();const f=r&&!i&&!s?F3(r,o):Bs(0),p=a.left+o.scrollLeft-c.x-f.x,m=a.top+o.scrollTop-c.y-f.y;return{x:p,y:m,width:a.width,height:a.height}}function Q0(t){return xs(t).position==="static"}function LC(t,e){if(!$s(t)||xs(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Ks(t)===n&&(n=n.ownerDocument.body),n}function O3(t,e){const n=wr(t);if(wy(t))return n;if(!$s(t)){let r=jo(t);for(;r&&!Qu(r);){if(gs(r)&&!Q0(r))return r;r=jo(r)}return n}let i=LC(t,e);for(;i&&w8(i)&&Q0(i);)i=LC(i,e);return i&&Qu(i)&&Q0(i)&&!DS(i)?n:i||M8(t)||n}const U8=async function(t){const e=this.getOffsetParent||O3,n=this.getDimensions,i=await n(t.floating);return{reference:O8(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function z8(t){return xs(t).direction==="rtl"}const B8={convertOffsetParentRelativeRectToViewportRelativeRect:P8,getDocumentElement:Ks,getClippingRect:F8,getOffsetParent:O3,getElementRects:U8,getClientRects:N8,getDimensions:j8,getScale:ku,isElement:gs,isRTL:z8};function U3(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function V8(t,e){let n=null,i;const r=Ks(t);function s(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),s();const u=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(o||e(),!m||!g)return;const y=Rm(p),b=Rm(r.clientWidth-(f+m)),w=Rm(r.clientHeight-(p+g)),x=Rm(f),S={rootMargin:-y+"px "+-b+"px "+-w+"px "+-x+"px",threshold:gr(0,Fo(1,c))||1};let M=!0;function E(C){const N=C[0].intersectionRatio;if(N!==c){if(!M)return a();N?a(!1,N):i=setTimeout(()=>{a(!1,1e-7)},1e3)}N===1&&!U3(u,t.getBoundingClientRect())&&a(),M=!1}try{n=new IntersectionObserver(E,{...S,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(t)}return a(!0),s}function H8(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,u=jS(t),f=r||s?[...u?of(u):[],...of(e)]:[];f.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=u&&o?V8(u,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[_]=x;_&&_.target===u&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=g)==null||S.observe(e)})),n()}),u&&!c&&g.observe(u),g.observe(e));let y,b=c?ic(t):null;c&&w();function w(){const x=ic(t);b&&!U3(b,x)&&n(),b=x,y=requestAnimationFrame(w)}return n(),()=>{var x;f.forEach(_=>{r&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,c&&cancelAnimationFrame(y)}}const W8=p8,G8=m8,q8=d8,X8=x8,$8=h8,DC=u8,Y8=g8,Q8=(t,e,n)=>{const i=new Map,r={platform:B8,...n},s={...r.platform,_c:i};return c8(t,e,{...r,platform:s})};var K8=typeof document<"u",Z8=function(){},qg=K8?I.useLayoutEffect:Z8;function Rx(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!Rx(t[i],e[i]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&t.$$typeof)&&!Rx(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function z3(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function FC(t,e){const n=z3(t);return Math.round(e*n)/n}function K0(t){const e=I.useRef(t);return qg(()=>{e.current=t}),e}function J8(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=t,[f,p]=I.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,g]=I.useState(i);Rx(m,i)||g(i);const[y,b]=I.useState(null),[w,x]=I.useState(null),_=I.useCallback(L=>{L!==C.current&&(C.current=L,b(L))},[]),S=I.useCallback(L=>{L!==N.current&&(N.current=L,x(L))},[]),M=s||y,E=a||w,C=I.useRef(null),N=I.useRef(null),D=I.useRef(f),R=c!=null,k=K0(c),V=K0(r),G=K0(u),ie=I.useCallback(()=>{if(!C.current||!N.current)return;const L={placement:e,strategy:n,middleware:m};V.current&&(L.platform=V.current),Q8(C.current,N.current,L).then(j=>{const B={...j,isPositioned:G.current!==!1};z.current&&!Rx(D.current,B)&&(D.current=B,Xf.flushSync(()=>{p(B)}))})},[m,e,n,V,G]);qg(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(L=>({...L,isPositioned:!1})))},[u]);const z=I.useRef(!1);qg(()=>(z.current=!0,()=>{z.current=!1}),[]),qg(()=>{if(M&&(C.current=M),E&&(N.current=E),M&&E){if(k.current)return k.current(M,E,ie);ie()}},[M,E,ie,k,R]);const $=I.useMemo(()=>({reference:C,floating:N,setReference:_,setFloating:S}),[_,S]),X=I.useMemo(()=>({reference:M,floating:E}),[M,E]),ee=I.useMemo(()=>{const L={position:n,left:0,top:0};if(!X.floating)return L;const j=FC(X.floating,f.x),B=FC(X.floating,f.y);return o?{...L,transform:"translate("+j+"px, "+B+"px)",...z3(X.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:B}},[n,o,X.floating,f.x,f.y]);return I.useMemo(()=>({...f,update:ie,refs:$,elements:X,floatingStyles:ee}),[f,ie,$,X,ee])}const eV=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:r}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?DC({element:i.current,padding:r}).fn(n):{}:i?DC({element:i,padding:r}).fn(n):{}}}},tV=(t,e)=>({...W8(t),options:[t,e]}),nV=(t,e)=>({...G8(t),options:[t,e]}),iV=(t,e)=>({...Y8(t),options:[t,e]}),rV=(t,e)=>({...q8(t),options:[t,e]}),sV=(t,e)=>({...X8(t),options:[t,e]}),aV=(t,e)=>({...$8(t),options:[t,e]}),oV=(t,e)=>({...eV(t),options:[t,e]});var lV="Arrow",B3=I.forwardRef((t,e)=>{const{children:n,width:i=10,height:r=5,...s}=t;return l.jsx(Kn.svg,{...s,ref:e,width:i,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});B3.displayName=lV;var cV=B3;function uV(t){const[e,n]=I.useState(void 0);return Xs(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,o;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else n(void 0)},[t]),e}var US="Popper",[V3,H3]=ud(US),[dV,W3]=V3(US),G3=t=>{const{__scopePopper:e,children:n}=t,[i,r]=I.useState(null);return l.jsx(dV,{scope:e,anchor:i,onAnchorChange:r,children:n})};G3.displayName=US;var q3="PopperAnchor",X3=I.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:i,...r}=t,s=W3(q3,n),a=I.useRef(null),o=Ar(e,a);return I.useEffect(()=>{s.onAnchorChange((i==null?void 0:i.current)||a.current)}),i?null:l.jsx(Kn.div,{...r,ref:o})});X3.displayName=q3;var zS="PopperContent",[hV,fV]=V3(zS),$3=I.forwardRef((t,e)=>{var xe,nt,it,ze,Xe,q;const{__scopePopper:n,side:i="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:y,...b}=t,w=W3(zS,n),[x,_]=I.useState(null),S=Ar(e,_e=>_(_e)),[M,E]=I.useState(null),C=uV(M),N=(C==null?void 0:C.width)??0,D=(C==null?void 0:C.height)??0,R=i+(s!=="center"?"-"+s:""),k=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},V=Array.isArray(u)?u:[u],G=V.length>0,ie={padding:k,boundary:V.filter(mV),altBoundary:G},{refs:z,floatingStyles:$,placement:X,isPositioned:ee,middlewareData:L}=J8({strategy:"fixed",placement:R,whileElementsMounted:(..._e)=>H8(..._e,{animationFrame:g==="always"}),elements:{reference:w.anchor},middleware:[tV({mainAxis:r+D,alignmentAxis:a}),c&&nV({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?iV():void 0,...ie}),c&&rV({...ie}),sV({...ie,apply:({elements:_e,rects:fe,availableWidth:Te,availableHeight:he})=>{const{width:Qe,height:De}=fe.reference,O=_e.floating.style;O.setProperty("--radix-popper-available-width",`${Te}px`),O.setProperty("--radix-popper-available-height",`${he}px`),O.setProperty("--radix-popper-anchor-width",`${Qe}px`),O.setProperty("--radix-popper-anchor-height",`${De}px`)}}),M&&oV({element:M,padding:o}),gV({arrowWidth:N,arrowHeight:D}),m&&aV({strategy:"referenceHidden",...ie})]}),[j,B]=K3(X),Y=Do(y);Xs(()=>{ee&&(Y==null||Y())},[ee,Y]);const Z=(xe=L.arrow)==null?void 0:xe.x,K=(nt=L.arrow)==null?void 0:nt.y,se=((it=L.arrow)==null?void 0:it.centerOffset)!==0,[ge,Ce]=I.useState();return Xs(()=>{x&&Ce(window.getComputedStyle(x).zIndex)},[x]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:ee?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(ze=L.transformOrigin)==null?void 0:ze.x,(Xe=L.transformOrigin)==null?void 0:Xe.y].join(" "),...((q=L.hide)==null?void 0:q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(hV,{scope:n,placedSide:j,onArrowChange:E,arrowX:Z,arrowY:K,shouldHideArrow:se,children:l.jsx(Kn.div,{"data-side":j,"data-align":B,...b,ref:S,style:{...b.style,animation:ee?void 0:"none"}})})})});$3.displayName=zS;var Y3="PopperArrow",pV={top:"bottom",right:"left",bottom:"top",left:"right"},Q3=I.forwardRef(function(e,n){const{__scopePopper:i,...r}=e,s=fV(Y3,i),a=pV[s.placedSide];return l.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:l.jsx(cV,{...r,ref:n,style:{...r.style,display:"block"}})})});Q3.displayName=Y3;function mV(t){return t!==null}var gV=t=>({name:"transformOrigin",options:t,fn(e){var w,x,_;const{placement:n,rects:i,middlewareData:r}=e,a=((w=r.arrow)==null?void 0:w.centerOffset)!==0,o=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[u,f]=K3(n),p={start:"0%",center:"50%",end:"100%"}[f],m=(((x=r.arrow)==null?void 0:x.x)??0)+o/2,g=(((_=r.arrow)==null?void 0:_.y)??0)+c/2;let y="",b="";return u==="bottom"?(y=a?p:`${m}px`,b=`${-c}px`):u==="top"?(y=a?p:`${m}px`,b=`${i.floating.height+c}px`):u==="right"?(y=`${-c}px`,b=a?p:`${g}px`):u==="left"&&(y=`${i.floating.width+c}px`,b=a?p:`${g}px`),{data:{x:y,y:b}}}});function K3(t){const[e,n="center"]=t.split("-");return[e,n]}var xV=G3,yV=X3,vV=$3,wV=Q3,[_y,Vre]=ud("Tooltip",[H3]),Sy=H3(),Z3="TooltipProvider",bV=700,f1="tooltip.open",[_V,BS]=_y(Z3),J3=t=>{const{__scopeTooltip:e,delayDuration:n=bV,skipDelayDuration:i=300,disableHoverableContent:r=!1,children:s}=t,a=I.useRef(!0),o=I.useRef(!1),c=I.useRef(0);return I.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(_V,{scope:e,isOpenDelayedRef:a,delayDuration:n,onOpen:I.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:I.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,i)},[i]),isPointerInTransitRef:o,onPointerInTransitChange:I.useCallback(u=>{o.current=u},[]),disableHoverableContent:r,children:s})};J3.displayName=Z3;var lf="Tooltip",[SV,Ay]=_y(lf),eL=t=>{const{__scopeTooltip:e,children:n,open:i,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:o}=t,c=BS(lf,t.__scopeTooltip),u=Sy(e),[f,p]=I.useState(null),m=RS(),g=I.useRef(0),y=a??c.disableHoverableContent,b=o??c.delayDuration,w=I.useRef(!1),[x,_]=$f({prop:i,defaultProp:r??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(f1))):c.onClose(),s==null||s(N)},caller:lf}),S=I.useMemo(()=>x?w.current?"delayed-open":"instant-open":"closed",[x]),M=I.useCallback(()=>{window.clearTimeout(g.current),g.current=0,w.current=!1,_(!0)},[_]),E=I.useCallback(()=>{window.clearTimeout(g.current),g.current=0,_(!1)},[_]),C=I.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{w.current=!0,_(!0),g.current=0},b)},[b,_]);return I.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(xV,{...u,children:l.jsx(SV,{scope:e,contentId:m,open:x,stateAttribute:S,trigger:f,onTriggerChange:p,onTriggerEnter:I.useCallback(()=>{c.isOpenDelayedRef.current?C():M()},[c.isOpenDelayedRef,C,M]),onTriggerLeave:I.useCallback(()=>{y?E():(window.clearTimeout(g.current),g.current=0)},[E,y]),onOpen:M,onClose:E,disableHoverableContent:y,children:n})})};eL.displayName=lf;var p1="TooltipTrigger",tL=I.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=Ay(p1,n),s=BS(p1,n),a=Sy(n),o=I.useRef(null),c=Ar(e,o,r.onTriggerChange),u=I.useRef(!1),f=I.useRef(!1),p=I.useCallback(()=>u.current=!1,[]);return I.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(yV,{asChild:!0,...a,children:l.jsx(Kn.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...i,ref:c,onPointerMove:Fn(t.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:Fn(t.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:Fn(t.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Fn(t.onFocus,()=>{u.current||r.onOpen()}),onBlur:Fn(t.onBlur,r.onClose),onClick:Fn(t.onClick,r.onClose)})})});tL.displayName=p1;var AV="TooltipPortal",[Hre,MV]=_y(AV,{forceMount:void 0}),Ku="TooltipContent",nL=I.forwardRef((t,e)=>{const n=MV(Ku,t.__scopeTooltip),{forceMount:i=n.forceMount,side:r="top",...s}=t,a=Ay(Ku,t.__scopeTooltip);return l.jsx(fy,{present:i||a.open,children:a.disableHoverableContent?l.jsx(iL,{side:r,...s,ref:e}):l.jsx(TV,{side:r,...s,ref:e})})}),TV=I.forwardRef((t,e)=>{const n=Ay(Ku,t.__scopeTooltip),i=BS(Ku,t.__scopeTooltip),r=I.useRef(null),s=Ar(e,r),[a,o]=I.useState(null),{trigger:c,onClose:u}=n,f=r.current,{onPointerInTransitChange:p}=i,m=I.useCallback(()=>{o(null),p(!1)},[p]),g=I.useCallback((y,b)=>{const w=y.currentTarget,x={x:y.clientX,y:y.clientY},_=RV(x,w.getBoundingClientRect()),S=IV(x,_),M=kV(b.getBoundingClientRect()),E=DV([...S,...M]);o(E),p(!0)},[p]);return I.useEffect(()=>()=>m(),[m]),I.useEffect(()=>{if(c&&f){const y=w=>g(w,f),b=w=>g(w,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",b)}}},[c,f,g,m]),I.useEffect(()=>{if(a){const y=b=>{const w=b.target,x={x:b.clientX,y:b.clientY},_=(c==null?void 0:c.contains(w))||(f==null?void 0:f.contains(w)),S=!LV(x,a);_?m():S&&(m(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,a,u,m]),l.jsx(iL,{...t,ref:s})}),[EV,CV]=_y(lf,{isInside:!1}),PV=Tz("TooltipContent"),iL=I.forwardRef((t,e)=>{const{__scopeTooltip:n,children:i,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=t,c=Ay(Ku,n),u=Sy(n),{onClose:f}=c;return I.useEffect(()=>(document.addEventListener(f1,f),()=>document.removeEventListener(f1,f)),[f]),I.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(MS,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(vV,{"data-state":c.stateAttribute,...u,...o,ref:e,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(PV,{children:i}),l.jsx(EV,{scope:n,isInside:!0,children:l.jsx(Yz,{id:c.contentId,role:"tooltip",children:r||i})})]})})});nL.displayName=Ku;var rL="TooltipArrow",NV=I.forwardRef((t,e)=>{const{__scopeTooltip:n,...i}=t,r=Sy(n);return CV(rL,n).isInside?null:l.jsx(wV,{...r,...i,ref:e})});NV.displayName=rL;function RV(t,e){const n=Math.abs(e.top-t.y),i=Math.abs(e.bottom-t.y),r=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function IV(t,e,n=5){const i=[];switch(e){case"top":i.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":i.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":i.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":i.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return i}function kV(t){const{top:e,right:n,bottom:i,left:r}=t;return[{x:r,y:e},{x:n,y:e},{x:n,y:i},{x:r,y:i}]}function LV(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s],c=e[a],u=o.x,f=o.y,p=c.x,m=c.y;f>i!=m>i&&n<(p-u)*(i-f)/(m-f)+u&&(r=!r)}return r}function DV(t){const e=t.slice();return e.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),FV(e)}function FV(t){if(t.length<=1)return t.slice();const e=[];for(let i=0;i<t.length;i++){const r=t[i];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))e.pop();else break}e.push(r)}e.pop();const n=[];for(let i=t.length-1;i>=0;i--){const r=t[i];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var jV=J3,OV=eL,UV=tL,sL=nL;const zV=jV,BV=OV,VV=UV,aL=I.forwardRef(({className:t,sideOffset:e=4,...n},i)=>l.jsx(sL,{ref:i,sideOffset:e,className:oi("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));aL.displayName=sL.displayName;var My=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ty=typeof window>"u"||"Deno"in globalThis;function rs(){}function HV(t,e){return typeof t=="function"?t(e):t}function WV(t){return typeof t=="number"&&t>=0&&t!==1/0}function GV(t,e){return Math.max(t+(e||0)-Date.now(),0)}function m1(t,e){return typeof t=="function"?t(e):t}function qV(t,e){return typeof t=="function"?t(e):t}function jC(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:a,stale:o}=t;if(a){if(i){if(e.queryHash!==VS(a,e.options))return!1}else if(!uf(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||r&&r!==e.state.fetchStatus||s&&!s(e))}function OC(t,e){const{exact:n,status:i,predicate:r,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(cf(e.options.mutationKey)!==cf(s))return!1}else if(!uf(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function VS(t,e){return((e==null?void 0:e.queryKeyHashFn)||cf)(t)}function cf(t){return JSON.stringify(t,(e,n)=>g1(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function uf(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>uf(t[n],e[n])):!1}function oL(t,e){if(t===e)return t;const n=UC(t)&&UC(e);if(n||g1(t)&&g1(e)){const i=n?t:Object.keys(t),r=i.length,s=n?e:Object.keys(e),a=s.length,o=n?[]:{},c=new Set(i);let u=0;for(let f=0;f<a;f++){const p=n?f:s[f];(!n&&c.has(p)||n)&&t[p]===void 0&&e[p]===void 0?(o[p]=void 0,u++):(o[p]=oL(t[p],e[p]),o[p]===t[p]&&t[p]!==void 0&&u++)}return r===a&&u===r?t:o}return e}function UC(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function g1(t){if(!zC(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!zC(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function zC(t){return Object.prototype.toString.call(t)==="[object Object]"}function XV(t){return new Promise(e=>{setTimeout(e,t)})}function $V(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?oL(t,e):e}function YV(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function QV(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var HS=Symbol();function lL(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===HS?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var Ll,fo,Du,mR,KV=(mR=class extends My{constructor(){super();Wt(this,Ll);Wt(this,fo);Wt(this,Du);_t(this,Du,e=>{if(!Ty&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){pe(this,fo)||this.setEventListener(pe(this,Du))}onUnsubscribe(){var e;this.hasListeners()||((e=pe(this,fo))==null||e.call(this),_t(this,fo,void 0))}setEventListener(e){var n;_t(this,Du,e),(n=pe(this,fo))==null||n.call(this),_t(this,fo,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){pe(this,Ll)!==e&&(_t(this,Ll,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof pe(this,Ll)=="boolean"?pe(this,Ll):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ll=new WeakMap,fo=new WeakMap,Du=new WeakMap,mR),cL=new KV,Fu,po,ju,gR,ZV=(gR=class extends My{constructor(){super();Wt(this,Fu,!0);Wt(this,po);Wt(this,ju);_t(this,ju,e=>{if(!Ty&&window.addEventListener){const n=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){pe(this,po)||this.setEventListener(pe(this,ju))}onUnsubscribe(){var e;this.hasListeners()||((e=pe(this,po))==null||e.call(this),_t(this,po,void 0))}setEventListener(e){var n;_t(this,ju,e),(n=pe(this,po))==null||n.call(this),_t(this,po,e(this.setOnline.bind(this)))}setOnline(e){pe(this,Fu)!==e&&(_t(this,Fu,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return pe(this,Fu)}},Fu=new WeakMap,po=new WeakMap,ju=new WeakMap,gR),Ix=new ZV;function JV(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},n.reject=r=>{i({status:"rejected",reason:r}),e(r)},n}function eH(t){return Math.min(1e3*2**t,3e4)}function uL(t){return(t??"online")==="online"?Ix.isOnline():!0}var dL=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Z0(t){return t instanceof dL}function hL(t){let e=!1,n=0,i=!1,r;const s=JV(),a=b=>{var w;i||(m(new dL(b)),(w=t.abort)==null||w.call(t))},o=()=>{e=!0},c=()=>{e=!1},u=()=>cL.isFocused()&&(t.networkMode==="always"||Ix.isOnline())&&t.canRun(),f=()=>uL(t.networkMode)&&t.canRun(),p=b=>{var w;i||(i=!0,(w=t.onSuccess)==null||w.call(t,b),r==null||r(),s.resolve(b))},m=b=>{var w;i||(i=!0,(w=t.onError)==null||w.call(t,b),r==null||r(),s.reject(b))},g=()=>new Promise(b=>{var w;r=x=>{(i||u())&&b(x)},(w=t.onPause)==null||w.call(t)}).then(()=>{var b;r=void 0,i||(b=t.onContinue)==null||b.call(t)}),y=()=>{if(i)return;let b;const w=n===0?t.initialPromise:void 0;try{b=w??t.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(p).catch(x=>{var C;if(i)return;const _=t.retry??(Ty?0:3),S=t.retryDelay??eH,M=typeof S=="function"?S(n,x):S,E=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,x);if(e||!E){m(x);return}n++,(C=t.onFail)==null||C.call(t,n,x),XV(M).then(()=>u()?void 0:g()).then(()=>{e?m(x):y()})})};return{promise:s,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?y():g().then(y),s)}}var tH=t=>setTimeout(t,0);function nH(){let t=[],e=0,n=o=>{o()},i=o=>{o()},r=tH;const s=o=>{e?t.push(o):r(()=>{n(o)})},a=()=>{const o=t;t=[],o.length&&r(()=>{i(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{s(()=>{o(...c)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{r=o}}}var Ui=nH(),Dl,xR,fL=(xR=class{constructor(){Wt(this,Dl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),WV(this.gcTime)&&_t(this,Dl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ty?1/0:5*60*1e3))}clearGcTimeout(){pe(this,Dl)&&(clearTimeout(pe(this,Dl)),_t(this,Dl,void 0))}},Dl=new WeakMap,xR),Ou,Fl,Br,jl,Mi,zf,Ol,as,fa,yR,iH=(yR=class extends fL{constructor(e){super();Wt(this,as);Wt(this,Ou);Wt(this,Fl);Wt(this,Br);Wt(this,jl);Wt(this,Mi);Wt(this,zf);Wt(this,Ol);_t(this,Ol,!1),_t(this,zf,e.defaultOptions),this.setOptions(e.options),this.observers=[],_t(this,jl,e.client),_t(this,Br,pe(this,jl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,_t(this,Ou,sH(this.options)),this.state=e.state??pe(this,Ou),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=pe(this,Mi))==null?void 0:e.promise}setOptions(e){this.options={...pe(this,zf),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&pe(this,Br).remove(this)}setData(e,n){const i=$V(this.state.data,e,this.options);return vi(this,as,fa).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(e,n){vi(this,as,fa).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var i,r;const n=(i=pe(this,Mi))==null?void 0:i.promise;return(r=pe(this,Mi))==null||r.cancel(e),n?n.then(rs).catch(rs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(pe(this,Ou))}isActive(){return this.observers.some(e=>qV(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===HS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>m1(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!GV(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=pe(this,Mi))==null||n.continue()}onOnline(){var n;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=pe(this,Mi))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),pe(this,Br).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(pe(this,Mi)&&(pe(this,Ol)?pe(this,Mi).cancel({revert:!0}):pe(this,Mi).cancelRetry()),this.scheduleGc()),pe(this,Br).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||vi(this,as,fa).call(this,{type:"invalidate"})}fetch(e,n){var u,f,p;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(pe(this,Mi))return pe(this,Mi).continueRetry(),pe(this,Mi).promise}if(e&&this.setOptions(e),!this.options.queryFn){const m=this.observers.find(g=>g.options.queryFn);m&&this.setOptions(m.options)}const i=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(_t(this,Ol,!0),i.signal)})},s=()=>{const m=lL(this.options,n),y=(()=>{const b={client:pe(this,jl),queryKey:this.queryKey,meta:this.meta};return r(b),b})();return _t(this,Ol,!1),this.options.persister?this.options.persister(m,y,this):m(y)},o=(()=>{const m={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:pe(this,jl),state:this.state,fetchFn:s};return r(m),m})();(u=this.options.behavior)==null||u.onFetch(o,this),_t(this,Fl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&vi(this,as,fa).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=m=>{var g,y,b,w;Z0(m)&&m.silent||vi(this,as,fa).call(this,{type:"error",error:m}),Z0(m)||((y=(g=pe(this,Br).config).onError)==null||y.call(g,m,this),(w=(b=pe(this,Br).config).onSettled)==null||w.call(b,this.state.data,m,this)),this.scheduleGc()};return _t(this,Mi,hL({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:i.abort.bind(i),onSuccess:m=>{var g,y,b,w;if(m===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(x){c(x);return}(y=(g=pe(this,Br).config).onSuccess)==null||y.call(g,m,this),(w=(b=pe(this,Br).config).onSettled)==null||w.call(b,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,g)=>{vi(this,as,fa).call(this,{type:"failed",failureCount:m,error:g})},onPause:()=>{vi(this,as,fa).call(this,{type:"pause"})},onContinue:()=>{vi(this,as,fa).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),pe(this,Mi).start()}},Ou=new WeakMap,Fl=new WeakMap,Br=new WeakMap,jl=new WeakMap,Mi=new WeakMap,zf=new WeakMap,Ol=new WeakMap,as=new WeakSet,fa=function(e){const n=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...rH(i.data,this.options),fetchMeta:e.meta??null};case"success":return _t(this,Fl,void 0),{...i,data:e.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return Z0(r)&&r.revert&&pe(this,Fl)?{...pe(this,Fl),fetchStatus:"idle"}:{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),Ui.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),pe(this,Br).notify({query:this,type:"updated",action:e})})},yR);function rH(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:uL(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function sH(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var ks,vR,aH=(vR=class extends My{constructor(e={}){super();Wt(this,ks);this.config=e,_t(this,ks,new Map)}build(e,n,i){const r=n.queryKey,s=n.queryHash??VS(r,n);let a=this.get(s);return a||(a=new iH({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){pe(this,ks).has(e.queryHash)||(pe(this,ks).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=pe(this,ks).get(e.queryHash);n&&(e.destroy(),n===e&&pe(this,ks).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ui.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return pe(this,ks).get(e)}getAll(){return[...pe(this,ks).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(i=>jC(n,i))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(i=>jC(e,i)):n}notify(e){Ui.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ui.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ui.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ks=new WeakMap,vR),Ls,ji,Ul,Ds,ro,wR,oH=(wR=class extends fL{constructor(e){super();Wt(this,Ds);Wt(this,Ls);Wt(this,ji);Wt(this,Ul);this.mutationId=e.mutationId,_t(this,ji,e.mutationCache),_t(this,Ls,[]),this.state=e.state||lH(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){pe(this,Ls).includes(e)||(pe(this,Ls).push(e),this.clearGcTimeout(),pe(this,ji).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){_t(this,Ls,pe(this,Ls).filter(n=>n!==e)),this.scheduleGc(),pe(this,ji).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){pe(this,Ls).length||(this.state.status==="pending"?this.scheduleGc():pe(this,ji).remove(this))}continue(){var e;return((e=pe(this,Ul))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,a,o,c,u,f,p,m,g,y,b,w,x,_,S,M,E,C,N,D;const n=()=>{vi(this,Ds,ro).call(this,{type:"continue"})};_t(this,Ul,hL({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(R,k)=>{vi(this,Ds,ro).call(this,{type:"failed",failureCount:R,error:k})},onPause:()=>{vi(this,Ds,ro).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>pe(this,ji).canRun(this)}));const i=this.state.status==="pending",r=!pe(this,Ul).canStart();try{if(i)n();else{vi(this,Ds,ro).call(this,{type:"pending",variables:e,isPaused:r}),await((a=(s=pe(this,ji).config).onMutate)==null?void 0:a.call(s,e,this));const k=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,e));k!==this.state.context&&vi(this,Ds,ro).call(this,{type:"pending",context:k,variables:e,isPaused:r})}const R=await pe(this,Ul).start();return await((f=(u=pe(this,ji).config).onSuccess)==null?void 0:f.call(u,R,e,this.state.context,this)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,R,e,this.state.context)),await((y=(g=pe(this,ji).config).onSettled)==null?void 0:y.call(g,R,null,this.state.variables,this.state.context,this)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,R,null,e,this.state.context)),vi(this,Ds,ro).call(this,{type:"success",data:R}),R}catch(R){try{throw await((_=(x=pe(this,ji).config).onError)==null?void 0:_.call(x,R,e,this.state.context,this)),await((M=(S=this.options).onError)==null?void 0:M.call(S,R,e,this.state.context)),await((C=(E=pe(this,ji).config).onSettled)==null?void 0:C.call(E,void 0,R,this.state.variables,this.state.context,this)),await((D=(N=this.options).onSettled)==null?void 0:D.call(N,void 0,R,e,this.state.context)),R}finally{vi(this,Ds,ro).call(this,{type:"error",error:R})}}finally{pe(this,ji).runNext(this)}}},Ls=new WeakMap,ji=new WeakMap,Ul=new WeakMap,Ds=new WeakSet,ro=function(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ui.batch(()=>{pe(this,Ls).forEach(i=>{i.onMutationUpdate(e)}),pe(this,ji).notify({mutation:this,type:"updated",action:e})})},wR);function lH(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ga,os,Bf,bR,cH=(bR=class extends My{constructor(e={}){super();Wt(this,ga);Wt(this,os);Wt(this,Bf);this.config=e,_t(this,ga,new Set),_t(this,os,new Map),_t(this,Bf,0)}build(e,n,i){const r=new oH({mutationCache:this,mutationId:++um(this,Bf)._,options:e.defaultMutationOptions(n),state:i});return this.add(r),r}add(e){pe(this,ga).add(e);const n=Im(e);if(typeof n=="string"){const i=pe(this,os).get(n);i?i.push(e):pe(this,os).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(pe(this,ga).delete(e)){const n=Im(e);if(typeof n=="string"){const i=pe(this,os).get(n);if(i)if(i.length>1){const r=i.indexOf(e);r!==-1&&i.splice(r,1)}else i[0]===e&&pe(this,os).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Im(e);if(typeof n=="string"){const i=pe(this,os).get(n),r=i==null?void 0:i.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){var i;const n=Im(e);if(typeof n=="string"){const r=(i=pe(this,os).get(n))==null?void 0:i.find(s=>s!==e&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ui.batch(()=>{pe(this,ga).forEach(e=>{this.notify({type:"removed",mutation:e})}),pe(this,ga).clear(),pe(this,os).clear()})}getAll(){return Array.from(pe(this,ga))}find(e){const n={exact:!0,...e};return this.getAll().find(i=>OC(n,i))}findAll(e={}){return this.getAll().filter(n=>OC(e,n))}notify(e){Ui.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ui.batch(()=>Promise.all(e.map(n=>n.continue().catch(rs))))}},ga=new WeakMap,os=new WeakMap,Bf=new WeakMap,bR);function Im(t){var e;return(e=t.options.scope)==null?void 0:e.id}function BC(t){return{onFetch:(e,n)=>{var f,p,m,g,y;const i=e.options,r=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((g=e.state.data)==null?void 0:g.pages)||[],a=((y=e.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let b=!1;const w=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(e.signal.aborted?b=!0:e.signal.addEventListener("abort",()=>{b=!0}),e.signal)})},x=lL(e.options,e.fetchOptions),_=async(S,M,E)=>{if(b)return Promise.reject();if(M==null&&S.pages.length)return Promise.resolve(S);const N=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:M,direction:E?"backward":"forward",meta:e.options.meta};return w(V),V})(),D=await x(N),{maxPages:R}=e.options,k=E?QV:YV;return{pages:k(S.pages,D,R),pageParams:k(S.pageParams,M,R)}};if(r&&s.length){const S=r==="backward",M=S?uH:VC,E={pages:s,pageParams:a},C=M(i,E);o=await _(E,C,S)}else{const S=t??s.length;do{const M=c===0?a[0]??i.initialPageParam:VC(i,o);if(c>0&&M==null)break;o=await _(o,M),c++}while(c<S)}return o};e.options.persister?e.fetchFn=()=>{var b,w;return(w=(b=e.options).persister)==null?void 0:w.call(b,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function VC(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function uH(t,{pages:e,pageParams:n}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,n[0],n):void 0}var Tn,mo,go,Uu,zu,xo,Bu,Vu,_R,dH=(_R=class{constructor(t={}){Wt(this,Tn);Wt(this,mo);Wt(this,go);Wt(this,Uu);Wt(this,zu);Wt(this,xo);Wt(this,Bu);Wt(this,Vu);_t(this,Tn,t.queryCache||new aH),_t(this,mo,t.mutationCache||new cH),_t(this,go,t.defaultOptions||{}),_t(this,Uu,new Map),_t(this,zu,new Map),_t(this,xo,0)}mount(){um(this,xo)._++,pe(this,xo)===1&&(_t(this,Bu,cL.subscribe(async t=>{t&&(await this.resumePausedMutations(),pe(this,Tn).onFocus())})),_t(this,Vu,Ix.subscribe(async t=>{t&&(await this.resumePausedMutations(),pe(this,Tn).onOnline())})))}unmount(){var t,e;um(this,xo)._--,pe(this,xo)===0&&((t=pe(this,Bu))==null||t.call(this),_t(this,Bu,void 0),(e=pe(this,Vu))==null||e.call(this),_t(this,Vu,void 0))}isFetching(t){return pe(this,Tn).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return pe(this,mo).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=pe(this,Tn).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=pe(this,Tn).build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(m1(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return pe(this,Tn).findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),r=pe(this,Tn).get(i.queryHash),s=r==null?void 0:r.state.data,a=HV(e,s);if(a!==void 0)return pe(this,Tn).build(this,i).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Ui.batch(()=>pe(this,Tn).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=pe(this,Tn).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=pe(this,Tn);Ui.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=pe(this,Tn);return Ui.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=Ui.batch(()=>pe(this,Tn).findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(rs).catch(rs)}invalidateQueries(t,e={}){return Ui.batch(()=>(pe(this,Tn).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=Ui.batch(()=>pe(this,Tn).findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(rs)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(rs)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=pe(this,Tn).build(this,e);return n.isStaleByTime(m1(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(rs).catch(rs)}fetchInfiniteQuery(t){return t.behavior=BC(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(rs).catch(rs)}ensureInfiniteQueryData(t){return t.behavior=BC(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Ix.isOnline()?pe(this,mo).resumePausedMutations():Promise.resolve()}getQueryCache(){return pe(this,Tn)}getMutationCache(){return pe(this,mo)}getDefaultOptions(){return pe(this,go)}setDefaultOptions(t){_t(this,go,t)}setQueryDefaults(t,e){pe(this,Uu).set(cf(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...pe(this,Uu).values()],n={};return e.forEach(i=>{uf(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){pe(this,zu).set(cf(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...pe(this,zu).values()],n={};return e.forEach(i=>{uf(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...pe(this,go).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=VS(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===HS&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...pe(this,go).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){pe(this,Tn).clear(),pe(this,mo).clear()}},Tn=new WeakMap,mo=new WeakMap,go=new WeakMap,Uu=new WeakMap,zu=new WeakMap,xo=new WeakMap,Bu=new WeakMap,Vu=new WeakMap,_R),hH=I.createContext(void 0),fH=({client:t,children:e})=>(I.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),l.jsx(hH.Provider,{value:t,children:e}));/**
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function df(){return df=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},df.apply(this,arguments)}var wo;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(wo||(wo={}));const HC="popstate";function pH(t){t===void 0&&(t={});function e(i,r){let{pathname:s,search:a,hash:o}=i.location;return x1("",{pathname:s,search:a,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:kx(r)}return gH(e,n,null,t)}function On(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function pL(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function mH(){return Math.random().toString(36).substr(2,8)}function WC(t,e){return{usr:t.state,key:t.key,idx:e}}function x1(t,e,n,i){return n===void 0&&(n=null),df({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?pd(e):e,{state:n,key:e&&e.key||i||mH()})}function kx(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function pd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function gH(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,a=r.history,o=wo.Pop,c=null,u=f();u==null&&(u=0,a.replaceState(df({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function p(){o=wo.Pop;let w=f(),x=w==null?null:w-u;u=w,c&&c({action:o,location:b.location,delta:x})}function m(w,x){o=wo.Push;let _=x1(b.location,w,x);u=f()+1;let S=WC(_,u),M=b.createHref(_);try{a.pushState(S,"",M)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;r.location.assign(M)}s&&c&&c({action:o,location:b.location,delta:1})}function g(w,x){o=wo.Replace;let _=x1(b.location,w,x);u=f();let S=WC(_,u),M=b.createHref(_);a.replaceState(S,"",M),s&&c&&c({action:o,location:b.location,delta:0})}function y(w){let x=r.location.origin!=="null"?r.location.origin:r.location.href,_=typeof w=="string"?w:kx(w);return _=_.replace(/ $/,"%20"),On(x,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,x)}let b={get action(){return o},get location(){return t(r,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return r.addEventListener(HC,p),c=w,()=>{r.removeEventListener(HC,p),c=null}},createHref(w){return e(r,w)},createURL:y,encodeLocation(w){let x=y(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(w){return a.go(w)}};return b}var GC;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(GC||(GC={}));function xH(t,e,n){return n===void 0&&(n="/"),yH(t,e,n,!1)}function yH(t,e,n,i){let r=typeof e=="string"?pd(e):e,s=WS(r.pathname||"/",n);if(s==null)return null;let a=mL(t);vH(a);let o=null;for(let c=0;o==null&&c<a.length;++c){let u=NH(s);o=CH(a[c],u,i)}return o}function mL(t,e,n,i){e===void 0&&(e=[]),n===void 0&&(n=[]),i===void 0&&(i="");let r=(s,a,o)=>{let c={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};c.relativePath.startsWith("/")&&(On(c.relativePath.startsWith(i),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(i.length));let u=Po([i,c.relativePath]),f=n.concat(c);s.children&&s.children.length>0&&(On(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),mL(s.children,e,f,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:TH(u,s.index),routesMeta:f})};return t.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))r(s,a);else for(let c of gL(s.path))r(s,a,c)}),e}function gL(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let a=gL(i.join("/")),o=[];return o.push(...a.map(c=>c===""?s:[s,c].join("/"))),r&&o.push(...a),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function vH(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:EH(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const wH=/^:[\w-]+$/,bH=3,_H=2,SH=1,AH=10,MH=-2,qC=t=>t==="*";function TH(t,e){let n=t.split("/"),i=n.length;return n.some(qC)&&(i+=MH),e&&(i+=_H),n.filter(r=>!qC(r)).reduce((r,s)=>r+(wH.test(s)?bH:s===""?SH:AH),i)}function EH(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function CH(t,e,n){let{routesMeta:i}=t,r={},s="/",a=[];for(let o=0;o<i.length;++o){let c=i[o],u=o===i.length-1,f=s==="/"?e:e.slice(s.length)||"/",p=XC({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),m=c.route;if(!p&&u&&n&&!i[i.length-1].route.index&&(p=XC({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!p)return null;Object.assign(r,p.params),a.push({params:r,pathname:Po([s,p.pathname]),pathnameBase:LH(Po([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=Po([s,p.pathnameBase]))}return a}function XC(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=PH(t.path,t.caseSensitive,t.end),r=e.match(n);if(!r)return null;let s=r[0],a=s.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:i.reduce((u,f,p)=>{let{paramName:m,isOptional:g}=f;if(m==="*"){let b=o[p]||"";a=s.slice(0,s.length-b.length).replace(/(.)\/+$/,"$1")}const y=o[p];return g&&!y?u[m]=void 0:u[m]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:a,pattern:t}}function PH(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),pL(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c)=>(i.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function NH(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return pL(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function WS(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function RH(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?pd(t):t;return{pathname:n?n.startsWith("/")?n:IH(n,e):e,search:DH(i),hash:FH(r)}}function IH(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function J0(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. 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 kH(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function GS(t,e){let n=kH(t);return e?n.map((i,r)=>r===n.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function qS(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=pd(t):(r=df({},t),On(!r.pathname||!r.pathname.includes("?"),J0("?","pathname","search",r)),On(!r.pathname||!r.pathname.includes("#"),J0("#","pathname","hash",r)),On(!r.search||!r.search.includes("#"),J0("#","search","hash",r)));let s=t===""||r.pathname==="",a=s?"/":r.pathname,o;if(a==null)o=n;else{let p=e.length-1;if(!i&&a.startsWith("..")){let m=a.split("/");for(;m[0]==="..";)m.shift(),p-=1;r.pathname=m.join("/")}o=p>=0?e[p]:"/"}let c=RH(r,o),u=a&&a!=="/"&&a.endsWith("/"),f=(s||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Po=t=>t.join("/").replace(/\/\/+/g,"/"),LH=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),DH=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,FH=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function jH(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const xL=["post","put","patch","delete"];new Set(xL);const OH=["get",...xL];new Set(OH);/**
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function hf(){return hf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},hf.apply(this,arguments)}const XS=I.createContext(null),UH=I.createContext(null),qo=I.createContext(null),Ey=I.createContext(null),ja=I.createContext({outlet:null,matches:[],isDataRoute:!1}),yL=I.createContext(null);function zH(t,e){let{relative:n}=e===void 0?{}:e;md()||On(!1);let{basename:i,navigator:r}=I.useContext(qo),{hash:s,pathname:a,search:o}=wL(t,{relative:n}),c=a;return i!=="/"&&(c=a==="/"?i:Po([i,a])),r.createHref({pathname:c,search:o,hash:s})}function md(){return I.useContext(Ey)!=null}function Xo(){return md()||On(!1),I.useContext(Ey).location}function vL(t){I.useContext(qo).static||I.useLayoutEffect(t)}function Kf(){let{isDataRoute:t}=I.useContext(ja);return t?eW():BH()}function BH(){md()||On(!1);let t=I.useContext(XS),{basename:e,future:n,navigator:i}=I.useContext(qo),{matches:r}=I.useContext(ja),{pathname:s}=Xo(),a=JSON.stringify(GS(r,n.v7_relativeSplatPath)),o=I.useRef(!1);return vL(()=>{o.current=!0}),I.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){i.go(u);return}let p=qS(u,JSON.parse(a),s,f.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Po([e,p.pathname])),(f.replace?i.replace:i.push)(p,f.state,f)},[e,i,a,s,t])}function VH(){let{matches:t}=I.useContext(ja),e=t[t.length-1];return e?e.params:{}}function wL(t,e){let{relative:n}=e===void 0?{}:e,{future:i}=I.useContext(qo),{matches:r}=I.useContext(ja),{pathname:s}=Xo(),a=JSON.stringify(GS(r,i.v7_relativeSplatPath));return I.useMemo(()=>qS(t,JSON.parse(a),s,n==="path"),[t,a,s,n])}function HH(t,e){return WH(t,e)}function WH(t,e,n,i){md()||On(!1);let{navigator:r}=I.useContext(qo),{matches:s}=I.useContext(ja),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=Xo(),f;if(e){var p;let w=typeof e=="string"?pd(e):e;c==="/"||(p=w.pathname)!=null&&p.startsWith(c)||On(!1),f=w}else f=u;let m=f.pathname||"/",g=m;if(c!=="/"){let w=c.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=xH(t,{pathname:g}),b=YH(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},o,w.params),pathname:Po([c,r.encodeLocation?r.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:Po([c,r.encodeLocation?r.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,i);return e&&b?I.createElement(Ey.Provider,{value:{location:hf({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:wo.Pop}},b):b}function GH(){let t=JH(),e=jH(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return I.createElement(I.Fragment,null,I.createElement("h2",null,"Unexpected Application Error!"),I.createElement("h3",{style:{fontStyle:"italic"}},e),n?I.createElement("pre",{style:r},n):null,null)}const qH=I.createElement(GH,null);class XH extends I.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?I.createElement(ja.Provider,{value:this.props.routeContext},I.createElement(yL.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $H(t){let{routeContext:e,match:n,children:i}=t,r=I.useContext(XS);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),I.createElement(ja.Provider,{value:e},i)}function YH(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=i)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,o=(r=n)==null?void 0:r.errors;if(o!=null){let f=a.findIndex(p=>p.route.id&&(o==null?void 0:o[p.route.id])!==void 0);f>=0||On(!1),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,u=-1;if(n&&i&&i.v7_partialHydration)for(let f=0;f<a.length;f++){let p=a[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(u=f),p.route.id){let{loaderData:m,errors:g}=n,y=p.route.loader&&m[p.route.id]===void 0&&(!g||g[p.route.id]===void 0);if(p.route.lazy||y){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,p,m)=>{let g,y=!1,b=null,w=null;n&&(g=o&&p.route.id?o[p.route.id]:void 0,b=p.route.errorElement||qH,c&&(u<0&&m===0?(y=!0,w=null):u===m&&(y=!0,w=p.route.hydrateFallbackElement||null)));let x=e.concat(a.slice(0,m+1)),_=()=>{let S;return g?S=b:y?S=w:p.route.Component?S=I.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=f,I.createElement($H,{match:p,routeContext:{outlet:f,matches:x,isDataRoute:n!=null},children:S})};return n&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?I.createElement(XH,{location:n.location,revalidation:n.revalidation,component:b,error:g,children:_(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):_()},null)}var bL=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(bL||{}),Lx=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Lx||{});function QH(t){let e=I.useContext(XS);return e||On(!1),e}function KH(t){let e=I.useContext(UH);return e||On(!1),e}function ZH(t){let e=I.useContext(ja);return e||On(!1),e}function _L(t){let e=ZH(),n=e.matches[e.matches.length-1];return n.route.id||On(!1),n.route.id}function JH(){var t;let e=I.useContext(yL),n=KH(Lx.UseRouteError),i=_L(Lx.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function eW(){let{router:t}=QH(bL.UseNavigateStable),e=_L(Lx.UseNavigateStable),n=I.useRef(!1);return vL(()=>{n.current=!0}),I.useCallback(function(r,s){s===void 0&&(s={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,hf({fromRouteId:e},s)))},[t,e])}function tW(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function ew(t){let{to:e,replace:n,state:i,relative:r}=t;md()||On(!1);let{future:s,static:a}=I.useContext(qo),{matches:o}=I.useContext(ja),{pathname:c}=Xo(),u=Kf(),f=qS(e,GS(o,s.v7_relativeSplatPath),c,r==="path"),p=JSON.stringify(f);return I.useEffect(()=>u(JSON.parse(p),{replace:n,state:i,relative:r}),[u,p,r,n,i]),null}function Kt(t){On(!1)}function nW(t){let{basename:e="/",children:n=null,location:i,navigationType:r=wo.Pop,navigator:s,static:a=!1,future:o}=t;md()&&On(!1);let c=e.replace(/^\/*/,"/"),u=I.useMemo(()=>({basename:c,navigator:s,static:a,future:hf({v7_relativeSplatPath:!1},o)}),[c,o,s,a]);typeof i=="string"&&(i=pd(i));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:y="default"}=i,b=I.useMemo(()=>{let w=WS(f,c);return w==null?null:{location:{pathname:w,search:p,hash:m,state:g,key:y},navigationType:r}},[c,f,p,m,g,y,r]);return b==null?null:I.createElement(qo.Provider,{value:u},I.createElement(Ey.Provider,{children:n,value:b}))}function iW(t){let{children:e,location:n}=t;return HH(y1(e),n)}new Promise(()=>{});function y1(t,e){e===void 0&&(e=[]);let n=[];return I.Children.forEach(t,(i,r)=>{if(!I.isValidElement(i))return;let s=[...e,r];if(i.type===I.Fragment){n.push.apply(n,y1(i.props.children,s));return}i.type!==Kt&&On(!1),!i.props.index||!i.props.children||On(!1);let a={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(a.children=y1(i.props.children,s)),n.push(a)}),n}/**
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function v1(){return v1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},v1.apply(this,arguments)}function rW(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,s;for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function sW(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function aW(t,e){return t.button===0&&(!e||e==="_self")&&!sW(t)}const oW=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lW="6";try{window.__reactRouterVersion=lW}catch{}const cW="startTransition",$C=L_[cW];function uW(t){let{basename:e,children:n,future:i,window:r}=t,s=I.useRef();s.current==null&&(s.current=pH({window:r,v5Compat:!0}));let a=s.current,[o,c]=I.useState({action:a.action,location:a.location}),{v7_startTransition:u}=i||{},f=I.useCallback(p=>{u&&$C?$C(()=>c(p)):c(p)},[c,u]);return I.useLayoutEffect(()=>a.listen(f),[a,f]),I.useEffect(()=>tW(i),[i]),I.createElement(nW,{basename:e,children:n,location:o.location,navigationType:o.action,navigator:a,future:i})}const dW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,We=I.forwardRef(function(e,n){let{onClick:i,relative:r,reloadDocument:s,replace:a,state:o,target:c,to:u,preventScrollReset:f,viewTransition:p}=e,m=rW(e,oW),{basename:g}=I.useContext(qo),y,b=!1;if(typeof u=="string"&&hW.test(u)&&(y=u,dW))try{let S=new URL(window.location.href),M=u.startsWith("//")?new URL(S.protocol+u):new URL(u),E=WS(M.pathname,g);M.origin===S.origin&&E!=null?u=E+M.search+M.hash:b=!0}catch{}let w=zH(u,{relative:r}),x=fW(u,{replace:a,state:o,target:c,preventScrollReset:f,relative:r,viewTransition:p});function _(S){i&&i(S),S.defaultPrevented||x(S)}return I.createElement("a",v1({},m,{href:y||w,onClick:b||s?i:_,ref:n,target:c}))});var YC;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(YC||(YC={}));var QC;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(QC||(QC={}));function fW(t,e){let{target:n,replace:i,state:r,preventScrollReset:s,relative:a,viewTransition:o}=e===void 0?{}:e,c=Kf(),u=Xo(),f=wL(t,{relative:a});return I.useCallback(p=>{if(aW(p,n)){p.preventDefault();let m=i!==void 0?i:kx(u)===kx(f);c(t,{replace:m,state:r,preventScrollReset:s,relative:a,viewTransition:o})}},[u,c,f,i,r,n,t,s,a,o])}const $S=I.createContext({});function YS(t){const e=I.useRef(null);return e.current===null&&(e.current=t()),e.current}const Cy=I.createContext(null),QS=I.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class pW extends I.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function mW({children:t,isPresent:e}){const n=I.useId(),i=I.useRef(null),r=I.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=I.useContext(QS);return I.useInsertionEffect(()=>{const{width:a,height:o,top:c,left:u}=r.current;if(e||!i.current||!a||!o)return;i.current.dataset.motionPopId=n;const f=document.createElement("style");return s&&(f.nonce=s),document.head.appendChild(f),f.sheet&&f.sheet.insertRule(`
[data-motion-pop-id="${n}"] {
position: absolute !important;
width: ${a}px !important;
height: ${o}px !important;
top: ${c}px !important;
left: ${u}px !important;
}
`),()=>{document.head.removeChild(f)}},[e]),l.jsx(pW,{isPresent:e,childRef:i,sizeRef:r,children:I.cloneElement(t,{ref:i})})}const gW=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:a})=>{const o=YS(xW),c=I.useId(),u=I.useCallback(p=>{o.set(p,!0);for(const m of o.values())if(!m)return;i&&i()},[o,i]),f=I.useMemo(()=>({id:c,initial:e,isPresent:n,custom:r,onExitComplete:u,register:p=>(o.set(p,!1),()=>o.delete(p))}),s?[Math.random(),u]:[n,u]);return I.useMemo(()=>{o.forEach((p,m)=>o.set(m,!1))},[n]),I.useEffect(()=>{!n&&!o.size&&i&&i()},[n]),a==="popLayout"&&(t=l.jsx(mW,{isPresent:n,children:t})),l.jsx(Cy.Provider,{value:f,children:t})};function xW(){return new Map}function SL(t=!0){const e=I.useContext(Cy);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,s=I.useId();I.useEffect(()=>{t&&r(s)},[t]);const a=I.useCallback(()=>t&&i&&i(s),[s,i,t]);return!n&&i?[!1,a]:[!0]}const km=t=>t.key||"";function KC(t){const e=[];return I.Children.forEach(t,n=>{I.isValidElement(n)&&e.push(n)}),e}const KS=typeof window<"u",AL=KS?I.useLayoutEffect:I.useEffect,Vl=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1})=>{const[o,c]=SL(a),u=I.useMemo(()=>KC(t),[t]),f=a&&!o?[]:u.map(km),p=I.useRef(!0),m=I.useRef(u),g=YS(()=>new Map),[y,b]=I.useState(u),[w,x]=I.useState(u);AL(()=>{p.current=!1,m.current=u;for(let M=0;M<w.length;M++){const E=km(w[M]);f.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[w,f.length,f.join("-")]);const _=[];if(u!==y){let M=[...u];for(let E=0;E<w.length;E++){const C=w[E],N=km(C);f.includes(N)||(M.splice(E,0,C),_.push(C))}s==="wait"&&_.length&&(M=_),x(KC(M)),b(u);return}const{forceRender:S}=I.useContext($S);return l.jsx(l.Fragment,{children:w.map(M=>{const E=km(M),C=a&&!o?!1:u===w||f.includes(E),N=()=>{if(g.has(E))g.set(E,!0);else return;let D=!0;g.forEach(R=>{R||(D=!1)}),D&&(S==null||S(),x(m.current),a&&(c==null||c()),i&&i())};return l.jsx(gW,{isPresent:C,initial:!p.current||n?void 0:!1,custom:C?void 0:e,presenceAffectsLayout:r,mode:s,onExitComplete:C?void 0:N,children:M},E)})})},br=t=>t;let w1=br;function ZS(t){let e;return()=>(e===void 0&&(e=t()),e)}const Zu=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i},Sa=t=>t*1e3,Aa=t=>t/1e3,yW={skipAnimations:!1,useManualTiming:!1};function vW(t){let e=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function o(u){s.has(u)&&(c.schedule(u),t()),u(a)}const c={schedule:(u,f=!1,p=!1)=>{const g=p&&i?e:n;return f&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[e,n]=[n,e],e.forEach(o),e.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const Lm=["read","resolveKeyframes","update","preRender","render","postRender"],wW=40;function ML(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=Lm.reduce((x,_)=>(x[_]=vW(s),x),{}),{read:o,resolveKeyframes:c,update:u,preRender:f,render:p,postRender:m}=a,g=()=>{const x=performance.now();n=!1,r.delta=i?1e3/60:Math.max(Math.min(x-r.timestamp,wW),1),r.timestamp=x,r.isProcessing=!0,o.process(r),c.process(r),u.process(r),f.process(r),p.process(r),m.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(g))},y=()=>{n=!0,i=!0,r.isProcessing||t(g)};return{schedule:Lm.reduce((x,_)=>{const S=a[_];return x[_]=(M,E=!1,C=!1)=>(n||y(),S.schedule(M,E,C)),x},{}),cancel:x=>{for(let _=0;_<Lm.length;_++)a[Lm[_]].cancel(x)},state:r,steps:a}}const{schedule:cn,cancel:Oo,state:hi,steps:tw}=ML(typeof requestAnimationFrame<"u"?requestAnimationFrame:br,!0),TL=I.createContext({strict:!1}),ZC={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"]},Ju={};for(const t in ZC)Ju[t]={isEnabled:e=>ZC[t].some(n=>!!e[n])};function bW(t){for(const e in t)Ju[e]={...Ju[e],...t[e]}}const _W=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 Dx(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_W.has(t)}let EL=t=>!Dx(t);function SW(t){t&&(EL=e=>e.startsWith("on")?!Dx(e):t(e))}try{SW(require("@emotion/is-prop-valid").default)}catch{}function AW(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||(EL(r)||n===!0&&Dx(r)||!e&&!Dx(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}function MW(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...i)=>t(...i);return new Proxy(n,{get:(i,r)=>r==="create"?t:(e.has(r)||e.set(r,t(r)),e.get(r))})}const Py=I.createContext({});function ff(t){return typeof t=="string"||Array.isArray(t)}function Ny(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const JS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],eA=["initial",...JS];function Ry(t){return Ny(t.animate)||eA.some(e=>ff(t[e]))}function CL(t){return!!(Ry(t)||t.variants)}function TW(t,e){if(Ry(t)){const{initial:n,animate:i}=t;return{initial:n===!1||ff(n)?n:void 0,animate:ff(i)?i:void 0}}return t.inherit!==!1?e:{}}function EW(t){const{initial:e,animate:n}=TW(t,I.useContext(Py));return I.useMemo(()=>({initial:e,animate:n}),[JC(e),JC(n)])}function JC(t){return Array.isArray(t)?t.join(" "):t}const CW=Symbol.for("motionComponentSymbol");function mu(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function PW(t,e,n){return I.useCallback(i=>{i&&t.onMount&&t.onMount(i),e&&(i?e.mount(i):e.unmount()),n&&(typeof n=="function"?n(i):mu(n)&&(n.current=i))},[e])}const tA=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),NW="framerAppearId",PL="data-"+tA(NW),{schedule:nA,cancel:Wre}=ML(queueMicrotask,!1),NL=I.createContext({});function RW(t,e,n,i,r){var s,a;const{visualElement:o}=I.useContext(Py),c=I.useContext(TL),u=I.useContext(Cy),f=I.useContext(QS).reducedMotion,p=I.useRef(null);i=i||c.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:f}));const m=p.current,g=I.useContext(NL);m&&!m.projection&&r&&(m.type==="html"||m.type==="svg")&&IW(p.current,n,r,g);const y=I.useRef(!1);I.useInsertionEffect(()=>{m&&y.current&&m.update(n,u)});const b=n[PL],w=I.useRef(!!b&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return AL(()=>{m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),nA.render(m.render),w.current&&m.animationState&&m.animationState.animateChanges())}),I.useEffect(()=>{m&&(!w.current&&m.animationState&&m.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,b)}),w.current=!1))}),m}function IW(t,e,n,i){const{layoutId:r,layout:s,drag:a,dragConstraints:o,layoutScroll:c,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:RL(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||o&&mu(o),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,layoutScroll:c,layoutRoot:u})}function RL(t){if(t)return t.options.allowProjection!==!1?t.projection:RL(t.parent)}function kW({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:i,Component:r}){var s,a;t&&bW(t);function o(u,f){let p;const m={...I.useContext(QS),...u,layoutId:LW(u)},{isStatic:g}=m,y=EW(u),b=i(u,g);if(!g&&KS){DW();const w=FW(m);p=w.MeasureLayout,y.visualElement=RW(r,b,m,e,w.ProjectionNode)}return l.jsxs(Py.Provider,{value:y,children:[p&&y.visualElement?l.jsx(p,{visualElement:y.visualElement,...m}):null,n(r,u,PW(b,y.visualElement,f),b,g,y.visualElement)]})}o.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const c=I.forwardRef(o);return c[CW]=r,c}function LW({layoutId:t}){const e=I.useContext($S).id;return e&&t!==void 0?e+"-"+t:t}function DW(t,e){I.useContext(TL).strict}function FW(t){const{drag:e,layout:n}=Ju;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}const jW=["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 iA(t){return typeof t!="string"||t.includes("-")?!1:!!(jW.indexOf(t)>-1||/[A-Z]/u.test(t))}function e2(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function rA(t,e,n,i){if(typeof e=="function"){const[r,s]=e2(i);e=e(n!==void 0?n:t.custom,r,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,s]=e2(i);e=e(n!==void 0?n:t.custom,r,s)}return e}const b1=t=>Array.isArray(t),OW=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),UW=t=>b1(t)?t[t.length-1]||0:t,Pi=t=>!!(t&&t.getVelocity);function Xg(t){const e=Pi(t)?t.get():t;return OW(e)?e.toValue():e}function zW({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,r,s){const a={latestValues:BW(i,r,s,t),renderState:e()};return n&&(a.onMount=o=>n({props:i,current:o,...a}),a.onUpdate=o=>n(o)),a}const IL=t=>(e,n)=>{const i=I.useContext(Py),r=I.useContext(Cy),s=()=>zW(t,e,i,r);return n?s():YS(s)};function BW(t,e,n,i){const r={},s=i(t,{});for(const m in s)r[m]=Xg(s[m]);let{initial:a,animate:o}=t;const c=Ry(t),u=CL(t);e&&u&&!c&&t.inherit!==!1&&(a===void 0&&(a=e.initial),o===void 0&&(o=e.animate));let f=n?n.initial===!1:!1;f=f||a===!1;const p=f?o:a;if(p&&typeof p!="boolean"&&!Ny(p)){const m=Array.isArray(p)?p:[p];for(let g=0;g<m.length;g++){const y=rA(t,m[g]);if(y){const{transitionEnd:b,transition:w,...x}=y;for(const _ in x){let S=x[_];if(Array.isArray(S)){const M=f?S.length-1:0;S=S[M]}S!==null&&(r[_]=S)}for(const _ in b)r[_]=b[_]}}}return r}const gd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],cc=new Set(gd),kL=t=>e=>typeof e=="string"&&e.startsWith(t),LL=kL("--"),VW=kL("var(--"),sA=t=>VW(t)?HW.test(t.split("/*")[0].trim()):!1,HW=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,DL=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Ia=(t,e,n)=>n>e?e:n<t?t:n,xd={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},pf={...xd,transform:t=>Ia(0,1,t)},Dm={...xd,default:1},Zf=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),so=Zf("deg"),Vs=Zf("%"),ct=Zf("px"),WW=Zf("vh"),GW=Zf("vw"),t2={...Vs,parse:t=>Vs.parse(t)/100,transform:t=>Vs.transform(t*100)},qW={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,backgroundPositionX:ct,backgroundPositionY:ct},XW={rotate:so,rotateX:so,rotateY:so,rotateZ:so,scale:Dm,scaleX:Dm,scaleY:Dm,scaleZ:Dm,skew:so,skewX:so,skewY:so,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:pf,originX:t2,originY:t2,originZ:ct},n2={...xd,transform:Math.round},aA={...qW,...XW,zIndex:n2,size:ct,fillOpacity:pf,strokeOpacity:pf,numOctaves:n2},$W={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},YW=gd.length;function QW(t,e,n){let i="",r=!0;for(let s=0;s<YW;s++){const a=gd[s],o=t[a];if(o===void 0)continue;let c=!0;if(typeof o=="number"?c=o===(a.startsWith("scale")?1:0):c=parseFloat(o)===0,!c||n){const u=DL(o,aA[a]);if(!c){r=!1;const f=$W[a]||a;i+=`${f}(${u}) `}n&&(e[a]=u)}}return i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}function oA(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let a=!1,o=!1;for(const c in e){const u=e[c];if(cc.has(c)){a=!0;continue}else if(LL(c)){r[c]=u;continue}else{const f=DL(u,aA[c]);c.startsWith("origin")?(o=!0,s[c]=f):i[c]=f}}if(e.transform||(a||n?i.transform=QW(e,t.transform,n):i.transform&&(i.transform="none")),o){const{originX:c="50%",originY:u="50%",originZ:f=0}=s;i.transformOrigin=`${c} ${u} ${f}`}}const KW={offset:"stroke-dashoffset",array:"stroke-dasharray"},ZW={offset:"strokeDashoffset",array:"strokeDasharray"};function JW(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?KW:ZW;t[s.offset]=ct.transform(-i);const a=ct.transform(e),o=ct.transform(n);t[s.array]=`${a} ${o}`}function i2(t,e,n){return typeof t=="string"?t:ct.transform(e+n*t)}function eG(t,e,n){const i=i2(e,t.x,t.width),r=i2(n,t.y,t.height);return`${i} ${r}`}function lA(t,{attrX:e,attrY:n,attrScale:i,originX:r,originY:s,pathLength:a,pathSpacing:o=1,pathOffset:c=0,...u},f,p){if(oA(t,u,p),f){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:m,style:g,dimensions:y}=t;m.transform&&(y&&(g.transform=m.transform),delete m.transform),y&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=eG(y,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(m.x=e),n!==void 0&&(m.y=n),i!==void 0&&(m.scale=i),a!==void 0&&JW(m,a,o,c,!1)}const cA=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),FL=()=>({...cA(),attrs:{}}),uA=t=>typeof t=="string"&&t.toLowerCase()==="svg";function jL(t,{style:e,vars:n},i,r){Object.assign(t.style,e,r&&r.getProjectionStyles(i));for(const s in n)t.style.setProperty(s,n[s])}const OL=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 UL(t,e,n,i){jL(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(OL.has(r)?r:tA(r),e.attrs[r])}const Fx={};function tG(t){Object.assign(Fx,t)}function zL(t,{layout:e,layoutId:n}){return cc.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Fx[t]||t==="opacity")}function dA(t,e,n){var i;const{style:r}=t,s={};for(const a in r)(Pi(r[a])||e.style&&Pi(e.style[a])||zL(a,t)||((i=n==null?void 0:n.getValue(a))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(s[a]=r[a]);return s}function BL(t,e,n){const i=dA(t,e,n);for(const r in t)if(Pi(t[r])||Pi(e[r])){const s=gd.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}function nG(t,e){try{e.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{e.dimensions={x:0,y:0,width:0,height:0}}}const r2=["x","y","width","height","cx","cy","r"],iG={useVisualState:IL({scrapeMotionValuesFromProps:BL,createRenderState:FL,onUpdate:({props:t,prevProps:e,current:n,renderState:i,latestValues:r})=>{if(!n)return;let s=!!t.drag;if(!s){for(const o in r)if(cc.has(o)){s=!0;break}}if(!s)return;let a=!e;if(e)for(let o=0;o<r2.length;o++){const c=r2[o];t[c]!==e[c]&&(a=!0)}a&&cn.read(()=>{nG(n,i),cn.render(()=>{lA(i,r,uA(n.tagName),t.transformTemplate),UL(n,i)})})}})},rG={useVisualState:IL({scrapeMotionValuesFromProps:dA,createRenderState:cA})};function VL(t,e,n){for(const i in e)!Pi(e[i])&&!zL(i,n)&&(t[i]=e[i])}function sG({transformTemplate:t},e){return I.useMemo(()=>{const n=cA();return oA(n,e,t),Object.assign({},n.vars,n.style)},[e])}function aG(t,e){const n=t.style||{},i={};return VL(i,n,t),Object.assign(i,sG(t,e)),i}function oG(t,e){const n={},i=aG(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}function lG(t,e,n,i){const r=I.useMemo(()=>{const s=FL();return lA(s,e,uA(i),t.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};VL(s,t.style,t),r.style={...s,...r.style}}return r}function cG(t=!1){return(n,i,r,{latestValues:s},a)=>{const c=(iA(n)?lG:oG)(i,s,a,n),u=AW(i,typeof n=="string",t),f=n!==I.Fragment?{...u,...c,ref:r}:{},{children:p}=i,m=I.useMemo(()=>Pi(p)?p.get():p,[p]);return I.createElement(n,{...f,children:m})}}function uG(t,e){return function(i,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...iA(i)?iG:rG,preloadedFeatures:t,useRender:cG(r),createVisualElement:e,Component:i};return kW(a)}}function HL(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}function Iy(t,e,n){const i=t.getProps();return rA(i,e,n!==void 0?n:i.custom,t)}const dG=ZS(()=>window.ScrollTimeline!==void 0);class hG{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e,n){const i=this.animations.map(r=>{if(dG()&&r.attachTimeline)return r.attachTimeline(e);if(typeof n=="function")return n(r)});return()=>{i.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class fG extends hG{then(e,n){return Promise.all(this.animations).then(e).catch(n)}}function hA(t,e){return t?t[e]||t.default||t:void 0}const _1=2e4;function WL(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<_1;)e+=n,i=t.next(e);return e>=_1?1/0:e}function fA(t){return typeof t=="function"}function s2(t,e){t.timeline=e,t.onfinish=null}const pA=t=>Array.isArray(t)&&typeof t[0]=="number",pG={linearEasing:void 0};function mG(t,e){const n=ZS(t);return()=>{var i;return(i=pG[e])!==null&&i!==void 0?i:n()}}const jx=mG(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),GL=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let s=0;s<r;s++)i+=t(Zu(0,r-1,s))+", ";return`linear(${i.substring(0,i.length-2)})`};function qL(t){return!!(typeof t=="function"&&jx()||!t||typeof t=="string"&&(t in S1||jx())||pA(t)||Array.isArray(t)&&t.every(qL))}const xh=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,S1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xh([0,.65,.55,1]),circOut:xh([.55,0,1,.45]),backIn:xh([.31,.01,.66,-.59]),backOut:xh([.33,1.53,.69,.99])};function XL(t,e){if(t)return typeof t=="function"&&jx()?GL(t,e):pA(t)?xh(t):Array.isArray(t)?t.map(n=>XL(n,e)||S1.easeOut):S1[t]}const ns={x:!1,y:!1};function $L(){return ns.x||ns.y}function gG(t,e,n){var i;if(t instanceof Element)return[t];if(typeof t=="string"){let r=document;const s=(i=void 0)!==null&&i!==void 0?i:r.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function YL(t,e){const n=gG(t),i=new AbortController,r={passive:!0,...e,signal:i.signal};return[n,r,()=>i.abort()]}function a2(t){return e=>{e.pointerType==="touch"||$L()||t(e)}}function xG(t,e,n={}){const[i,r,s]=YL(t,n),a=a2(o=>{const{target:c}=o,u=e(o);if(typeof u!="function"||!c)return;const f=a2(p=>{u(p),c.removeEventListener("pointerleave",f)});c.addEventListener("pointerleave",f,r)});return i.forEach(o=>{o.addEventListener("pointerenter",a,r)}),s}const QL=(t,e)=>e?t===e?!0:QL(t,e.parentElement):!1,mA=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,yG=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function vG(t){return yG.has(t.tagName)||t.tabIndex!==-1}const yh=new WeakSet;function o2(t){return e=>{e.key==="Enter"&&t(e)}}function nw(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const wG=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=o2(()=>{if(yh.has(n))return;nw(n,"down");const r=o2(()=>{nw(n,"up")}),s=()=>nw(n,"cancel");n.addEventListener("keyup",r,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function l2(t){return mA(t)&&!$L()}function bG(t,e,n={}){const[i,r,s]=YL(t,n),a=o=>{const c=o.currentTarget;if(!l2(o)||yh.has(c))return;yh.add(c);const u=e(o),f=(g,y)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",m),!(!l2(g)||!yh.has(c))&&(yh.delete(c),typeof u=="function"&&u(g,{success:y}))},p=g=>{f(g,n.useGlobalTarget||QL(c,g.target))},m=g=>{f(g,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",m,r)};return i.forEach(o=>{!vG(o)&&o.getAttribute("tabindex")===null&&(o.tabIndex=0),(n.useGlobalTarget?window:o).addEventListener("pointerdown",a,r),o.addEventListener("focus",u=>wG(u,r),r)}),s}function _G(t){return t==="x"||t==="y"?ns[t]?null:(ns[t]=!0,()=>{ns[t]=!1}):ns.x||ns.y?null:(ns.x=ns.y=!0,()=>{ns.x=ns.y=!1})}const KL=new Set(["width","height","top","left","right","bottom",...gd]);let $g;function SG(){$g=void 0}const Hs={now:()=>($g===void 0&&Hs.set(hi.isProcessing||yW.useManualTiming?hi.timestamp:performance.now()),$g),set:t=>{$g=t,queueMicrotask(SG)}};function gA(t,e){t.indexOf(e)===-1&&t.push(e)}function xA(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class yA{constructor(){this.subscriptions=[]}add(e){return gA(this.subscriptions,e),()=>xA(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function ZL(t,e){return e?t*(1e3/e):0}const c2=30,AG=t=>!isNaN(parseFloat(t));class MG{constructor(e,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,r=!0)=>{const s=Hs.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Hs.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=AG(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new yA);const i=this.events[e].add(n);return e==="change"?()=>{i(),cn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Hs.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>c2)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,c2);return ZL(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function mf(t,e){return new MG(t,e)}function TG(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,mf(n))}function EG(t,e){const n=Iy(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const a in s){const o=UW(s[a]);TG(t,a,o)}}function CG(t){return!!(Pi(t)&&t.add)}function A1(t,e){const n=t.getValue("willChange");if(CG(n))return n.add(e)}function JL(t){return t.props[PL]}const eD=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,PG=1e-7,NG=12;function RG(t,e,n,i,r){let s,a,o=0;do a=e+(n-e)/2,s=eD(a,i,r)-t,s>0?n=a:e=a;while(Math.abs(s)>PG&&++o<NG);return a}function Jf(t,e,n,i){if(t===e&&n===i)return br;const r=s=>RG(s,0,1,t,n);return s=>s===0||s===1?s:eD(r(s),e,i)}const tD=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,nD=t=>e=>1-t(1-e),iD=Jf(.33,1.53,.69,.99),vA=nD(iD),rD=tD(vA),sD=t=>(t*=2)<1?.5*vA(t):.5*(2-Math.pow(2,-10*(t-1))),wA=t=>1-Math.sin(Math.acos(t)),aD=nD(wA),oD=tD(wA),lD=t=>/^0[^.\s]+$/u.test(t);function IG(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||lD(t):!0}const Rh=t=>Math.round(t*1e5)/1e5,bA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function kG(t){return t==null}const LG=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,_A=(t,e)=>n=>!!(typeof n=="string"&&LG.test(n)&&n.startsWith(t)||e&&!kG(n)&&Object.prototype.hasOwnProperty.call(n,e)),cD=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,s,a,o]=i.match(bA);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},DG=t=>Ia(0,255,t),iw={...xd,transform:t=>Math.round(DG(t))},Pl={test:_A("rgb","red"),parse:cD("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+iw.transform(t)+", "+iw.transform(e)+", "+iw.transform(n)+", "+Rh(pf.transform(i))+")"};function FG(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const M1={test:_A("#"),parse:FG,transform:Pl.transform},gu={test:_A("hsl","hue"),parse:cD("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+Vs.transform(Rh(e))+", "+Vs.transform(Rh(n))+", "+Rh(pf.transform(i))+")"},Ti={test:t=>Pl.test(t)||M1.test(t)||gu.test(t),parse:t=>Pl.test(t)?Pl.parse(t):gu.test(t)?gu.parse(t):M1.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Pl.transform(t):gu.transform(t)},jG=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function OG(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(bA))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(jG))===null||n===void 0?void 0:n.length)||0)>0}const uD="number",dD="color",UG="var",zG="var(",u2="${}",BG=/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 gf(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const o=e.replace(BG,c=>(Ti.test(c)?(i.color.push(s),r.push(dD),n.push(Ti.parse(c))):c.startsWith(zG)?(i.var.push(s),r.push(UG),n.push(c)):(i.number.push(s),r.push(uD),n.push(parseFloat(c))),++s,u2)).split(u2);return{values:n,split:o,indexes:i,types:r}}function hD(t){return gf(t).values}function fD(t){const{split:e,types:n}=gf(t),i=e.length;return r=>{let s="";for(let a=0;a<i;a++)if(s+=e[a],r[a]!==void 0){const o=n[a];o===uD?s+=Rh(r[a]):o===dD?s+=Ti.transform(r[a]):s+=r[a]}return s}}const VG=t=>typeof t=="number"?0:t;function HG(t){const e=hD(t);return fD(t)(e.map(VG))}const Uo={test:OG,parse:hD,createTransformer:fD,getAnimatableNone:HG},WG=new Set(["brightness","contrast","saturate","opacity"]);function GG(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(bA)||[];if(!i)return t;const r=n.replace(i,"");let s=WG.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const qG=/\b([a-z-]*)\(.*?\)/gu,T1={...Uo,getAnimatableNone:t=>{const e=t.match(qG);return e?e.map(GG).join(" "):t}},XG={...aA,color:Ti,backgroundColor:Ti,outlineColor:Ti,fill:Ti,stroke:Ti,borderColor:Ti,borderTopColor:Ti,borderRightColor:Ti,borderBottomColor:Ti,borderLeftColor:Ti,filter:T1,WebkitFilter:T1},SA=t=>XG[t];function pD(t,e){let n=SA(t);return n!==T1&&(n=Uo),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const $G=new Set(["auto","none","0"]);function YG(t,e,n){let i=0,r;for(;i<t.length&&!r;){const s=t[i];typeof s=="string"&&!$G.has(s)&&gf(s).values.length&&(r=t[i]),i++}if(r&&n)for(const s of e)t[s]=pD(n,r)}const d2=t=>t===xd||t===ct,h2=(t,e)=>parseFloat(t.split(", ")[e]),f2=(t,e)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/u);if(r)return h2(r[1],e);{const s=i.match(/^matrix\((.+)\)$/u);return s?h2(s[1],t):0}},QG=new Set(["x","y","z"]),KG=gd.filter(t=>!QG.has(t));function ZG(t){const e=[];return KG.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const ed={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:f2(4,13),y:f2(5,14)};ed.translateX=ed.x;ed.translateY=ed.y;const Hl=new Set;let E1=!1,C1=!1;function mD(){if(C1){const t=Array.from(Hl).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=ZG(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,a])=>{var o;(o=i.getValue(s))===null||o===void 0||o.set(a)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}C1=!1,E1=!1,Hl.forEach(t=>t.complete()),Hl.clear()}function gD(){Hl.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(C1=!0)})}function JG(){gD(),mD()}class AA{constructor(e,n,i,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Hl.add(this),E1||(E1=!0,cn.read(gD),cn.resolveKeyframes(mD))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;for(let s=0;s<e.length;s++)if(e[s]===null)if(s===0){const a=r==null?void 0:r.get(),o=e[e.length-1];if(a!==void 0)e[0]=a;else if(i&&n){const c=i.readValue(n,o);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=o),r&&a===void 0&&r.set(e[0])}else e[s]=e[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Hl.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Hl.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const xD=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),e7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function t7(t){const e=e7.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}function yD(t,e,n=1){const[i,r]=t7(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const a=s.trim();return xD(a)?parseFloat(a):a}return sA(r)?yD(r,e,n+1):r}const vD=t=>e=>e.test(t),n7={test:t=>t==="auto",parse:t=>t},wD=[xd,ct,Vs,so,GW,WW,n7],p2=t=>wD.find(vD(t));class bD extends AA{constructor(e,n,i,r,s){super(e,n,i,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let u=e[c];if(typeof u=="string"&&(u=u.trim(),sA(u))){const f=yD(u,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!KL.has(i)||e.length!==2)return;const[r,s]=e,a=p2(r),o=p2(s);if(a!==o)if(d2(a)&&d2(o))for(let c=0;c<e.length;c++){const u=e[c];typeof u=="string"&&(e[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)IG(e[r])&&i.push(r);i.length&&YG(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ed[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&e.getValue(i,r).jump(r,!1)}measureEndState(){var e;const{element:n,name:i,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(i);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=ed[i](n.measureViewportBox(),window.getComputedStyle(n.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const m2=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Uo.test(t)||t==="0")&&!t.startsWith("url("));function i7(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function r7(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],a=m2(r,e),o=m2(s,e);return!a||!o?!1:i7(t)||(n==="spring"||fA(n))&&i}const s7=t=>t!==null;function ky(t,{repeat:e,repeatType:n="loop"},i){const r=t.filter(s7),s=e&&n!=="loop"&&e%2===1?0:r.length-1;return!s||i===void 0?r[s]:i}const a7=40;class _D{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Hs.now(),this.options={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>a7?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&JG(),this._resolved}onKeyframesResolved(e,n){this.resolvedAt=Hs.now(),this.hasAttemptedResolve=!0;const{name:i,type:r,velocity:s,delay:a,onComplete:o,onUpdate:c,isGenerator:u}=this.options;if(!u&&!r7(e,i,r,s))if(a)this.options.duration=0;else{c&&c(ky(e,this.options,n)),o&&o(),this.resolveFinishedPromise();return}const f=this.initPlayback(e,n);f!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const vn=(t,e,n)=>t+(e-t)*n;function rw(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function o7({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,s=0,a=0;if(!e)r=s=a=n;else{const o=n<.5?n*(1+e):n+e-n*e,c=2*n-o;r=rw(c,o,t+1/3),s=rw(c,o,t),a=rw(c,o,t-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:i}}function Ox(t,e){return n=>n>0?e:t}const sw=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},l7=[M1,Pl,gu],c7=t=>l7.find(e=>e.test(t));function g2(t){const e=c7(t);if(!e)return!1;let n=e.parse(t);return e===gu&&(n=o7(n)),n}const x2=(t,e)=>{const n=g2(t),i=g2(e);if(!n||!i)return Ox(t,e);const r={...n};return s=>(r.red=sw(n.red,i.red,s),r.green=sw(n.green,i.green,s),r.blue=sw(n.blue,i.blue,s),r.alpha=vn(n.alpha,i.alpha,s),Pl.transform(r))},u7=(t,e)=>n=>e(t(n)),ep=(...t)=>t.reduce(u7),P1=new Set(["none","hidden"]);function d7(t,e){return P1.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function h7(t,e){return n=>vn(t,e,n)}function MA(t){return typeof t=="number"?h7:typeof t=="string"?sA(t)?Ox:Ti.test(t)?x2:m7:Array.isArray(t)?SD:typeof t=="object"?Ti.test(t)?x2:f7:Ox}function SD(t,e){const n=[...t],i=n.length,r=t.map((s,a)=>MA(s)(s,e[a]));return s=>{for(let a=0;a<i;a++)n[a]=r[a](s);return n}}function f7(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=MA(t[r])(t[r],e[r]));return r=>{for(const s in i)n[s]=i[s](r);return n}}function p7(t,e){var n;const i=[],r={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const a=e.types[s],o=t.indexes[a][r[a]],c=(n=t.values[o])!==null&&n!==void 0?n:0;i[s]=c,r[a]++}return i}const m7=(t,e)=>{const n=Uo.createTransformer(e),i=gf(t),r=gf(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?P1.has(t)&&!r.values.length||P1.has(e)&&!i.values.length?d7(t,e):ep(SD(p7(i,r),r.values),n):Ox(t,e)};function AD(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?vn(t,e,n):MA(t)(t,e)}const g7=5;function MD(t,e,n){const i=Math.max(e-g7,0);return ZL(n-t(i),e-i)}const En={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},aw=.001;function x7({duration:t=En.duration,bounce:e=En.bounce,velocity:n=En.velocity,mass:i=En.mass}){let r,s,a=1-e;a=Ia(En.minDamping,En.maxDamping,a),t=Ia(En.minDuration,En.maxDuration,Aa(t)),a<1?(r=u=>{const f=u*a,p=f*t,m=f-n,g=N1(u,a),y=Math.exp(-p);return aw-m/g*y},s=u=>{const p=u*a*t,m=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*t,y=Math.exp(-p),b=N1(Math.pow(u,2),a);return(-r(u)+aw>0?-1:1)*((m-g)*y)/b}):(r=u=>{const f=Math.exp(-u*t),p=(u-n)*t+1;return-aw+f*p},s=u=>{const f=Math.exp(-u*t),p=(n-u)*(t*t);return f*p});const o=5/t,c=v7(r,s,o);if(t=Sa(t),isNaN(c))return{stiffness:En.stiffness,damping:En.damping,duration:t};{const u=Math.pow(c,2)*i;return{stiffness:u,damping:a*2*Math.sqrt(i*u),duration:t}}}const y7=12;function v7(t,e,n){let i=n;for(let r=1;r<y7;r++)i=i-t(i)/e(i);return i}function N1(t,e){return t*Math.sqrt(1-e*e)}const w7=["duration","bounce"],b7=["stiffness","damping","mass"];function y2(t,e){return e.some(n=>t[n]!==void 0)}function _7(t){let e={velocity:En.velocity,stiffness:En.stiffness,damping:En.damping,mass:En.mass,isResolvedFromDuration:!1,...t};if(!y2(t,b7)&&y2(t,w7))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*Ia(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:En.mass,stiffness:r,damping:s}}else{const n=x7(t);e={...e,...n,mass:En.mass},e.isResolvedFromDuration=!0}return e}function TD(t=En.visualDuration,e=En.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],o={done:!1,value:s},{stiffness:c,damping:u,mass:f,duration:p,velocity:m,isResolvedFromDuration:g}=_7({...n,velocity:-Aa(n.velocity||0)}),y=m||0,b=u/(2*Math.sqrt(c*f)),w=a-s,x=Aa(Math.sqrt(c/f)),_=Math.abs(w)<5;i||(i=_?En.restSpeed.granular:En.restSpeed.default),r||(r=_?En.restDelta.granular:En.restDelta.default);let S;if(b<1){const E=N1(x,b);S=C=>{const N=Math.exp(-b*x*C);return a-N*((y+b*x*w)/E*Math.sin(E*C)+w*Math.cos(E*C))}}else if(b===1)S=E=>a-Math.exp(-x*E)*(w+(y+x*w)*E);else{const E=x*Math.sqrt(b*b-1);S=C=>{const N=Math.exp(-b*x*C),D=Math.min(E*C,300);return a-N*((y+b*x*w)*Math.sinh(D)+E*w*Math.cosh(D))/E}}const M={calculatedDuration:g&&p||null,next:E=>{const C=S(E);if(g)o.done=E>=p;else{let N=0;b<1&&(N=E===0?Sa(y):MD(S,E,C));const D=Math.abs(N)<=i,R=Math.abs(a-C)<=r;o.done=D&&R}return o.value=o.done?a:C,o},toString:()=>{const E=Math.min(WL(M),_1),C=GL(N=>M.next(E*N).value,E,30);return E+"ms "+C}};return M}function v2({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:o,max:c,restDelta:u=.5,restSpeed:f}){const p=t[0],m={done:!1,value:p},g=D=>o!==void 0&&D<o||c!==void 0&&D>c,y=D=>o===void 0?c:c===void 0||Math.abs(o-D)<Math.abs(c-D)?o:c;let b=n*e;const w=p+b,x=a===void 0?w:a(w);x!==w&&(b=x-p);const _=D=>-b*Math.exp(-D/i),S=D=>x+_(D),M=D=>{const R=_(D),k=S(D);m.done=Math.abs(R)<=u,m.value=m.done?x:k};let E,C;const N=D=>{g(m.value)&&(E=D,C=TD({keyframes:[m.value,y(m.value)],velocity:MD(S,D,m.value),damping:r,stiffness:s,restDelta:u,restSpeed:f}))};return N(0),{calculatedDuration:null,next:D=>{let R=!1;return!C&&E===void 0&&(R=!0,M(D),N(D)),E!==void 0&&D>=E?C.next(D-E):(!R&&M(D),m)}}}const S7=Jf(.42,0,1,1),A7=Jf(0,0,.58,1),ED=Jf(.42,0,.58,1),M7=t=>Array.isArray(t)&&typeof t[0]!="number",w2={linear:br,easeIn:S7,easeInOut:ED,easeOut:A7,circIn:wA,circInOut:oD,circOut:aD,backIn:vA,backInOut:rD,backOut:iD,anticipate:sD},b2=t=>{if(pA(t)){w1(t.length===4);const[e,n,i,r]=t;return Jf(e,n,i,r)}else if(typeof t=="string")return w1(w2[t]!==void 0),w2[t];return t};function T7(t,e,n){const i=[],r=n||AD,s=t.length-1;for(let a=0;a<s;a++){let o=r(t[a],t[a+1]);if(e){const c=Array.isArray(e)?e[a]||br:e;o=ep(c,o)}i.push(o)}return i}function E7(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(w1(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=T7(e,i,r),c=o.length,u=f=>{if(a&&f<t[0])return e[0];let p=0;if(c>1)for(;p<t.length-2&&!(f<t[p+1]);p++);const m=Zu(t[p],t[p+1],f);return o[p](m)};return n?f=>u(Ia(t[0],t[s-1],f)):u}function C7(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Zu(0,e,i);t.push(vn(n,1,r))}}function P7(t){const e=[0];return C7(e,t.length-1),e}function N7(t,e){return t.map(n=>n*e)}function R7(t,e){return t.map(()=>e||ED).splice(0,t.length-1)}function Ux({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=M7(i)?i.map(b2):b2(i),s={done:!1,value:e[0]},a=N7(n&&n.length===e.length?n:P7(e),t),o=E7(a,e,{ease:Array.isArray(r)?r:R7(e,r)});return{calculatedDuration:t,next:c=>(s.value=o(c),s.done=c>=t,s)}}const I7=t=>{const e=({timestamp:n})=>t(n);return{start:()=>cn.update(e,!0),stop:()=>Oo(e),now:()=>hi.isProcessing?hi.timestamp:Hs.now()}},k7={decay:v2,inertia:v2,tween:Ux,keyframes:Ux,spring:TD},L7=t=>t/100;class TA extends _D{constructor(e){super(e),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:c}=this.options;c&&c()};const{name:n,motionValue:i,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||AA,o=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,o,n,i,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:n="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,o=fA(n)?n:k7[n]||Ux;let c,u;o!==Ux&&typeof e[0]!="number"&&(c=ep(L7,AD(e[0],e[1])),e=[0,100]);const f=o({...this.options,keyframes:e});s==="mirror"&&(u=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),f.calculatedDuration===null&&(f.calculatedDuration=WL(f));const{calculatedDuration:p}=f,m=p+r,g=m*(i+1)-r;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:m,totalDuration:g}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:i}=this;if(!i){const{keyframes:D}=this.options;return{done:!0,value:D[D.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:c,calculatedDuration:u,totalDuration:f,resolvedDuration:p}=i;if(this.startTime===null)return s.next(0);const{delay:m,repeat:g,repeatType:y,repeatDelay:b,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-f/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const x=this.currentTime-m*(this.speed>=0?1:-1),_=this.speed>=0?x<0:x>f;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=f);let S=this.currentTime,M=s;if(g){const D=Math.min(this.currentTime,f)/p;let R=Math.floor(D),k=D%1;!k&&D>=1&&(k=1),k===1&&R--,R=Math.min(R,g+1),!!(R%2)&&(y==="reverse"?(k=1-k,b&&(k-=b/p)):y==="mirror"&&(M=a)),S=Ia(0,1,k)*p}const E=_?{done:!1,value:c[0]}:M.next(S);o&&(E.value=o(E.value));let{done:C}=E;!_&&u!==null&&(C=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return N&&r!==void 0&&(E.value=ky(c,this.options,r)),w&&w(E.value),N&&this.finish(),E}get duration(){const{resolved:e}=this;return e?Aa(e.calculatedDuration):0}get time(){return Aa(this.currentTime)}set time(e){e=Sa(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Aa(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=I7,onPlay:n,startTime:i}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=i??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}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(e){return this.startTime=0,this.tick(e,!0)}}const D7=new Set(["opacity","clipPath","filter","transform"]);function F7(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:o="easeInOut",times:c}={}){const u={[e]:n};c&&(u.offset=c);const f=XL(o,r);return Array.isArray(f)&&(u.easing=f),t.animate(u,{delay:i,duration:r,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const j7=ZS(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),zx=10,O7=2e4;function U7(t){return fA(t.type)||t.type==="spring"||!qL(t.ease)}function z7(t,e){const n=new TA({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const r=[];let s=0;for(;!i.done&&s<O7;)i=n.sample(s),r.push(i.value),s+=zx;return{times:void 0,keyframes:r,duration:s-zx,ease:"linear"}}const CD={anticipate:sD,backInOut:rD,circInOut:oD};function B7(t){return t in CD}class _2 extends _D{constructor(e){super(e);const{name:n,motionValue:i,element:r,keyframes:s}=this.options;this.resolver=new bD(s,(a,o)=>this.onKeyframesResolved(a,o),n,i,r),this.resolver.scheduleResolve()}initPlayback(e,n){let{duration:i=300,times:r,ease:s,type:a,motionValue:o,name:c,startTime:u}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof s=="string"&&jx()&&B7(s)&&(s=CD[s]),U7(this.options)){const{onComplete:p,onUpdate:m,motionValue:g,element:y,...b}=this.options,w=z7(e,b);e=w.keyframes,e.length===1&&(e[1]=e[0]),i=w.duration,r=w.times,s=w.ease,a="keyframes"}const f=F7(o.owner.current,c,e,{...this.options,duration:i,times:r,ease:s});return f.startTime=u??this.calcStartTime(),this.pendingTimeline?(s2(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:p}=this.options;o.set(ky(e,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:r,type:a,ease:s,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return Aa(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return Aa(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=Sa(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:n}=e;return n.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return br;const{animation:i}=n;s2(i,e)}return br}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:i,duration:r,type:s,ease:a,times:o}=e;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:p,element:m,...g}=this.options,y=new TA({...g,keyframes:i,duration:r,type:s,ease:a,times:o,isGenerator:!0}),b=Sa(this.time);u.setWithVelocity(y.sample(b-zx).value,y.sample(b).value,zx)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:i,repeatDelay:r,repeatType:s,damping:a,type:o}=e;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return j7()&&i&&D7.has(i)&&!c&&!u&&!r&&s!=="mirror"&&a!==0&&o!=="inertia"}}const V7={type:"spring",stiffness:500,damping:25,restSpeed:10},H7=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),W7={type:"keyframes",duration:.8},G7={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},q7=(t,{keyframes:e})=>e.length>2?W7:cc.has(t)?t.startsWith("scale")?H7(e[1]):V7:G7;function X7({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:o,from:c,elapsed:u,...f}){return!!Object.keys(f).length}const EA=(t,e,n,i={},r,s)=>a=>{const o=hA(i,t)||{},c=o.delay||i.delay||0;let{elapsed:u=0}=i;u=u-Sa(c);let f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...o,delay:-u,onUpdate:m=>{e.set(m),o.onUpdate&&o.onUpdate(m)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:t,motionValue:e,element:s?void 0:r};X7(o)||(f={...f,...q7(t,f)}),f.duration&&(f.duration=Sa(f.duration)),f.repeatDelay&&(f.repeatDelay=Sa(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let p=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(f.duration=0,f.delay===0&&(p=!0)),p&&!s&&e.get()!==void 0){const m=ky(f.keyframes,o);if(m!==void 0)return cn.update(()=>{f.onUpdate(m),f.onComplete()}),new fG([])}return!s&&_2.supports(f)?new _2(f):new TA(f)};function $7({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function PD(t,e,{delay:n=0,transitionOverride:i,type:r}={}){var s;let{transition:a=t.getDefaultTransition(),transitionEnd:o,...c}=e;i&&(a=i);const u=[],f=r&&t.animationState&&t.animationState.getState()[r];for(const p in c){const m=t.getValue(p,(s=t.latestValues[p])!==null&&s!==void 0?s:null),g=c[p];if(g===void 0||f&&$7(f,p))continue;const y={delay:n,...hA(a||{},p)};let b=!1;if(window.MotionHandoffAnimation){const x=JL(t);if(x){const _=window.MotionHandoffAnimation(x,p,cn);_!==null&&(y.startTime=_,b=!0)}}A1(t,p),m.start(EA(p,m,g,t.shouldReduceMotion&&KL.has(p)?{type:!1}:y,t,b));const w=m.animation;w&&u.push(w)}return o&&Promise.all(u).then(()=>{cn.update(()=>{o&&EG(t,o)})}),u}function R1(t,e,n={}){var i;const r=Iy(t,e,n.type==="exit"?(i=t.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(PD(t,r,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:p,staggerDirection:m}=s;return Y7(t,e,f+u,p,m,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[u,f]=c==="beforeChildren"?[a,o]:[o,a];return u().then(()=>f())}else return Promise.all([a(),o(n.delay)])}function Y7(t,e,n=0,i=0,r=1,s){const a=[],o=(t.variantChildren.size-1)*i,c=r===1?(u=0)=>u*i:(u=0)=>o-u*i;return Array.from(t.variantChildren).sort(Q7).forEach((u,f)=>{u.notify("AnimationStart",e),a.push(R1(u,e,{...s,delay:n+c(f)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(a)}function Q7(t,e){return t.sortNodePosition(e)}function K7(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>R1(t,s,n));i=Promise.all(r)}else if(typeof e=="string")i=R1(t,e,n);else{const r=typeof e=="function"?Iy(t,e,n.custom):e;i=Promise.all(PD(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const Z7=eA.length;function ND(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?ND(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Z7;n++){const i=eA[n],r=t.props[i];(ff(r)||r===!1)&&(e[i]=r)}return e}const J7=[...JS].reverse(),e9=JS.length;function t9(t){return e=>Promise.all(e.map(({animation:n,options:i})=>K7(t,n,i)))}function n9(t){let e=t9(t),n=S2(),i=!0;const r=c=>(u,f)=>{var p;const m=Iy(t,f,c==="exit"?(p=t.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(m){const{transition:g,transitionEnd:y,...b}=m;u={...u,...b,...y}}return u};function s(c){e=c(t)}function a(c){const{props:u}=t,f=ND(t.parent)||{},p=[],m=new Set;let g={},y=1/0;for(let w=0;w<e9;w++){const x=J7[w],_=n[x],S=u[x]!==void 0?u[x]:f[x],M=ff(S),E=x===c?_.isActive:null;E===!1&&(y=w);let C=S===f[x]&&S!==u[x]&&M;if(C&&i&&t.manuallyAnimateOnMount&&(C=!1),_.protectedKeys={...g},!_.isActive&&E===null||!S&&!_.prevProp||Ny(S)||typeof S=="boolean")continue;const N=i9(_.prevProp,S);let D=N||x===c&&_.isActive&&!C&&M||w>y&&M,R=!1;const k=Array.isArray(S)?S:[S];let V=k.reduce(r(x),{});E===!1&&(V={});const{prevResolvedValues:G={}}=_,ie={...G,...V},z=ee=>{D=!0,m.has(ee)&&(R=!0,m.delete(ee)),_.needsAnimating[ee]=!0;const L=t.getValue(ee);L&&(L.liveStyle=!1)};for(const ee in ie){const L=V[ee],j=G[ee];if(g.hasOwnProperty(ee))continue;let B=!1;b1(L)&&b1(j)?B=!HL(L,j):B=L!==j,B?L!=null?z(ee):m.add(ee):L!==void 0&&m.has(ee)?z(ee):_.protectedKeys[ee]=!0}_.prevProp=S,_.prevResolvedValues=V,_.isActive&&(g={...g,...V}),i&&t.blockInitialAnimation&&(D=!1),D&&(!(C&&N)||R)&&p.push(...k.map(ee=>({animation:ee,options:{type:x}})))}if(m.size){const w={};m.forEach(x=>{const _=t.getBaseTarget(x),S=t.getValue(x);S&&(S.liveStyle=!0),w[x]=_??null}),p.push({animation:w})}let b=!!p.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(b=!1),i=!1,b?e(p):Promise.resolve()}function o(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=t.variantChildren)===null||f===void 0||f.forEach(m=>{var g;return(g=m.animationState)===null||g===void 0?void 0:g.setActive(c,u)}),n[c].isActive=u;const p=a(c);for(const m in n)n[m].protectedKeys={};return p}return{animateChanges:a,setActive:o,setAnimateFunction:s,getState:()=>n,reset:()=>{n=S2(),i=!0}}}function i9(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!HL(e,t):!1}function ll(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function S2(){return{animate:ll(!0),whileInView:ll(),whileHover:ll(),whileTap:ll(),whileDrag:ll(),whileFocus:ll(),exit:ll()}}class $o{constructor(e){this.isMounted=!1,this.node=e}update(){}}class r9 extends $o{constructor(e){super(e),e.animationState||(e.animationState=n9(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ny(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let s9=0;class a9 extends $o{constructor(){super(...arguments),this.id=s9++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const o9={animation:{Feature:r9},exit:{Feature:a9}};function xf(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function tp(t){return{point:{x:t.pageX,y:t.pageY}}}const l9=t=>e=>mA(e)&&t(e,tp(e));function Ih(t,e,n,i){return xf(t,e,l9(n),i)}const A2=(t,e)=>Math.abs(t-e);function c9(t,e){const n=A2(t.x,e.x),i=A2(t.y,e.y);return Math.sqrt(n**2+i**2)}class RD{constructor(e,n,{transformPagePoint:i,contextWindow:r,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 p=lw(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=c9(p.offset,{x:0,y:0})>=3;if(!m&&!g)return;const{point:y}=p,{timestamp:b}=hi;this.history.push({...y,timestamp:b});const{onStart:w,onMove:x}=this.handlers;m||(w&&w(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=ow(m,this.transformPagePoint),cn.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=lw(p.type==="pointercancel"?this.lastMoveEventInfo:ow(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,w),y&&y(p,w)},!mA(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.contextWindow=r||window;const a=tp(e),o=ow(a,this.transformPagePoint),{point:c}=o,{timestamp:u}=hi;this.history=[{...c,timestamp:u}];const{onSessionStart:f}=n;f&&f(e,lw(o,this.history)),this.removeListeners=ep(Ih(this.contextWindow,"pointermove",this.handlePointerMove),Ih(this.contextWindow,"pointerup",this.handlePointerUp),Ih(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Oo(this.updatePoint)}}function ow(t,e){return e?{point:e(t.point)}:t}function M2(t,e){return{x:t.x-e.x,y:t.y-e.y}}function lw({point:t},e){return{point:t,delta:M2(t,ID(e)),offset:M2(t,u9(e)),velocity:d9(e,.1)}}function u9(t){return t[0]}function ID(t){return t[t.length-1]}function d9(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=ID(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>Sa(e)));)n--;if(!i)return{x:0,y:0};const s=Aa(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const kD=1e-4,h9=1-kD,f9=1+kD,LD=.01,p9=0-LD,m9=0+LD;function Mr(t){return t.max-t.min}function g9(t,e,n){return Math.abs(t-e)<=n}function T2(t,e,n,i=.5){t.origin=i,t.originPoint=vn(e.min,e.max,t.origin),t.scale=Mr(n)/Mr(e),t.translate=vn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=h9&&t.scale<=f9||isNaN(t.scale))&&(t.scale=1),(t.translate>=p9&&t.translate<=m9||isNaN(t.translate))&&(t.translate=0)}function kh(t,e,n,i){T2(t.x,e.x,n.x,i?i.originX:void 0),T2(t.y,e.y,n.y,i?i.originY:void 0)}function E2(t,e,n){t.min=n.min+e.min,t.max=t.min+Mr(e)}function x9(t,e,n){E2(t.x,e.x,n.x),E2(t.y,e.y,n.y)}function C2(t,e,n){t.min=e.min-n.min,t.max=t.min+Mr(e)}function Lh(t,e,n){C2(t.x,e.x,n.x),C2(t.y,e.y,n.y)}function y9(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?vn(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?vn(n,t,i.max):Math.min(t,n)),t}function P2(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function v9(t,{top:e,left:n,bottom:i,right:r}){return{x:P2(t.x,n,r),y:P2(t.y,e,i)}}function N2(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function w9(t,e){return{x:N2(t.x,e.x),y:N2(t.y,e.y)}}function b9(t,e){let n=.5;const i=Mr(t),r=Mr(e);return r>i?n=Zu(e.min,e.max-i,t.min):i>r&&(n=Zu(t.min,t.max-r,e.min)),Ia(0,1,n)}function _9(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const I1=.35;function S9(t=I1){return t===!1?t=0:t===!0&&(t=I1),{x:R2(t,"left","right"),y:R2(t,"top","bottom")}}function R2(t,e,n){return{min:I2(t,e),max:I2(t,n)}}function I2(t,e){return typeof t=="number"?t:t[e]||0}const k2=()=>({translate:0,scale:1,origin:0,originPoint:0}),xu=()=>({x:k2(),y:k2()}),L2=()=>({min:0,max:0}),kn=()=>({x:L2(),y:L2()});function zr(t){return[t("x"),t("y")]}function DD({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function A9({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function M9(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function cw(t){return t===void 0||t===1}function k1({scale:t,scaleX:e,scaleY:n}){return!cw(t)||!cw(e)||!cw(n)}function bl(t){return k1(t)||FD(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function FD(t){return D2(t.x)||D2(t.y)}function D2(t){return t&&t!=="0%"}function Bx(t,e,n){const i=t-n,r=e*i;return n+r}function F2(t,e,n,i,r){return r!==void 0&&(t=Bx(t,r,i)),Bx(t,n,i)+e}function L1(t,e=0,n=1,i,r){t.min=F2(t.min,e,n,i,r),t.max=F2(t.max,e,n,i,r)}function jD(t,{x:e,y:n}){L1(t.x,e.translate,e.scale,e.originPoint),L1(t.y,n.translate,n.scale,n.originPoint)}const j2=.999999999999,O2=1.0000000000001;function T9(t,e,n,i=!1){const r=n.length;if(!r)return;e.x=e.y=1;let s,a;for(let o=0;o<r;o++){s=n[o],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&vu(t,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(e.x*=a.x.scale,e.y*=a.y.scale,jD(t,a)),i&&bl(s.latestValues)&&vu(t,s.latestValues))}e.x<O2&&e.x>j2&&(e.x=1),e.y<O2&&e.y>j2&&(e.y=1)}function yu(t,e){t.min=t.min+e,t.max=t.max+e}function U2(t,e,n,i,r=.5){const s=vn(t.min,t.max,r);L1(t,e,n,s,i)}function vu(t,e){U2(t.x,e.x,e.scaleX,e.scale,e.originX),U2(t.y,e.y,e.scaleY,e.scale,e.originY)}function OD(t,e){return DD(M9(t.getBoundingClientRect(),e))}function E9(t,e,n){const i=OD(t,n),{scroll:r}=e;return r&&(yu(i.x,r.offset.x),yu(i.y,r.offset.y)),i}const UD=({current:t})=>t?t.ownerDocument.defaultView:null,C9=new WeakMap;class P9{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kn(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=f=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(tp(f).point)},s=(f,p)=>{const{drag:m,dragPropagation:g,onDragStart:y}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_G(m),!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),zr(w=>{let x=this.getAxisMotionValue(w).get()||0;if(Vs.test(x)){const{projection:_}=this.visualElement;if(_&&_.layout){const S=_.layout.layoutBox[w];S&&(x=Mr(S)*(parseFloat(x)/100))}}this.originPoint[w]=x}),y&&cn.postRender(()=>y(f,p)),A1(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(f,p)=>{const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:y,onDrag:b}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:w}=p;if(g&&this.currentDirection===null){this.currentDirection=N9(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",p.point,w),this.updateAxis("y",p.point,w),this.visualElement.render(),b&&b(f,p)},o=(f,p)=>this.stop(f,p),c=()=>zr(f=>{var p;return this.getAnimationState(f)==="paused"&&((p=this.getAxisMotionValue(f).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new RD(e,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:o,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:UD(this.visualElement)})}stop(e,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&cn.postRender(()=>s(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!Fm(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let a=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(a=y9(a,this.constraints[e],this.elastic[e])),s.set(a)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;n&&mu(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=v9(r.layoutBox,n):this.constraints=!1,this.elastic=S9(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&zr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=_9(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mu(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=E9(i,r.root,this.visualElement.getTransformPagePoint());let a=w9(r.layout.layoutBox,s);if(n){const o=n(A9(a));this.hasMutatedConstraints=!!o,o&&(a=DD(o))}return a}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=zr(f=>{if(!Fm(f,n,this.currentDirection))return;let p=c&&c[f]||{};a&&(p={min:0,max:0});const m=r?200:1e6,g=r?40:1e7,y={type:"inertia",velocity:i?e[f]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(f,y)});return Promise.all(u).then(o)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return A1(this.visualElement,e),i.start(EA(e,i,0,n,this.visualElement,!1))}stopAnimation(){zr(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){zr(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps(),r=i[n];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){zr(n=>{const{drag:i}=this.getProps();if(!Fm(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:o}=r.layout.layoutBox[n];s.set(e[n]-vn(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!mu(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};zr(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const c=o.get();r[a]=b9({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),zr(a=>{if(!Fm(a,e,null))return;const o=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];o.set(vn(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;C9.set(this.visualElement,this);const e=this.visualElement.current,n=Ih(e,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();mu(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),cn.read(i);const a=xf(window,"resize",()=>this.scalePositionWithinConstraints()),o=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(zr(f=>{const p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=I1,dragMomentum:o=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:o}}}function Fm(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function N9(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class R9 extends $o{constructor(e){super(e),this.removeGroupControls=br,this.removeListeners=br,this.controls=new P9(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||br}unmount(){this.removeGroupControls(),this.removeListeners()}}const z2=t=>(e,n)=>{t&&cn.postRender(()=>t(e,n))};class I9 extends $o{constructor(){super(...arguments),this.removePointerDownListener=br}onPointerDown(e){this.session=new RD(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:UD(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:z2(e),onStart:z2(n),onMove:i,onEnd:(s,a)=>{delete this.session,r&&cn.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Ih(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Yg={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function B2(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Jd={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ct.test(t))t=parseFloat(t);else return t;const n=B2(t,e.target.x),i=B2(t,e.target.y);return`${n}% ${i}%`}},k9={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Uo.parse(t);if(r.length>5)return i;const s=Uo.createTransformer(t),a=typeof r[0]!="number"?1:0,o=n.x.scale*e.x,c=n.y.scale*e.y;r[0+a]/=o,r[1+a]/=c;const u=vn(o,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class L9 extends I.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;tG(D9),s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Yg.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,a=i.projection;return a&&(a.isPresent=s,r||e.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?a.promote():a.relegate()||cn.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),nA.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function zD(t){const[e,n]=SL(),i=I.useContext($S);return l.jsx(L9,{...t,layoutGroup:i,switchLayoutGroup:I.useContext(NL),isPresent:e,safeToRemove:n})}const D9={borderRadius:{...Jd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Jd,borderTopRightRadius:Jd,borderBottomLeftRadius:Jd,borderBottomRightRadius:Jd,boxShadow:k9};function F9(t,e,n){const i=Pi(t)?t:mf(t);return i.start(EA("",i,e,n)),i.animation}function j9(t){return t instanceof SVGElement&&t.tagName!=="svg"}const O9=(t,e)=>t.depth-e.depth;class U9{constructor(){this.children=[],this.isDirty=!1}add(e){gA(this.children,e),this.isDirty=!0}remove(e){xA(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(O9),this.isDirty=!1,this.children.forEach(e)}}function z9(t,e){const n=Hs.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(Oo(i),t(s-e))};return cn.read(i,!0),()=>Oo(i)}const BD=["TopLeft","TopRight","BottomLeft","BottomRight"],B9=BD.length,V2=t=>typeof t=="string"?parseFloat(t):t,H2=t=>typeof t=="number"||ct.test(t);function V9(t,e,n,i,r,s){r?(t.opacity=vn(0,n.opacity!==void 0?n.opacity:1,H9(i)),t.opacityExit=vn(e.opacity!==void 0?e.opacity:1,0,W9(i))):s&&(t.opacity=vn(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let a=0;a<B9;a++){const o=`border${BD[a]}Radius`;let c=W2(e,o),u=W2(n,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||H2(c)===H2(u)?(t[o]=Math.max(vn(V2(c),V2(u),i),0),(Vs.test(u)||Vs.test(c))&&(t[o]+="%")):t[o]=u}(e.rotate||n.rotate)&&(t.rotate=vn(e.rotate||0,n.rotate||0,i))}function W2(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const H9=VD(0,.5,aD),W9=VD(.5,.95,br);function VD(t,e,n){return i=>i<t?0:i>e?1:n(Zu(t,e,i))}function G2(t,e){t.min=e.min,t.max=e.max}function Or(t,e){G2(t.x,e.x),G2(t.y,e.y)}function q2(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function X2(t,e,n,i,r){return t-=e,t=Bx(t,1/n,i),r!==void 0&&(t=Bx(t,1/r,i)),t}function G9(t,e=0,n=1,i=.5,r,s=t,a=t){if(Vs.test(e)&&(e=parseFloat(e),e=vn(a.min,a.max,e/100)-a.min),typeof e!="number")return;let o=vn(s.min,s.max,i);t===s&&(o-=e),t.min=X2(t.min,e,n,o,r),t.max=X2(t.max,e,n,o,r)}function $2(t,e,[n,i,r],s,a){G9(t,e[n],e[i],e[r],e.scale,s,a)}const q9=["x","scaleX","originX"],X9=["y","scaleY","originY"];function Y2(t,e,n,i){$2(t.x,e,q9,n?n.x:void 0,i?i.x:void 0),$2(t.y,e,X9,n?n.y:void 0,i?i.y:void 0)}function Q2(t){return t.translate===0&&t.scale===1}function HD(t){return Q2(t.x)&&Q2(t.y)}function K2(t,e){return t.min===e.min&&t.max===e.max}function $9(t,e){return K2(t.x,e.x)&&K2(t.y,e.y)}function Z2(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function WD(t,e){return Z2(t.x,e.x)&&Z2(t.y,e.y)}function J2(t){return Mr(t.x)/Mr(t.y)}function eP(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Y9{constructor(){this.members=[]}add(e){gA(this.members,e),e.scheduleRender()}remove(e){if(xA(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(r=>e===r);if(n===0)return!1;let i;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,n&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:i}=e;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Q9(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(i=`translate3d(${r}px, ${s}px, ${a}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:p,rotateY:m,skewX:g,skewY:y}=n;u&&(i=`perspective(${u}px) ${i}`),f&&(i+=`rotate(${f}deg) `),p&&(i+=`rotateX(${p}deg) `),m&&(i+=`rotateY(${m}deg) `),g&&(i+=`skewX(${g}deg) `),y&&(i+=`skewY(${y}deg) `)}const o=t.x.scale*e.x,c=t.y.scale*e.y;return(o!==1||c!==1)&&(i+=`scale(${o}, ${c})`),i||"none"}const _l={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},vh=typeof window<"u"&&window.MotionDebug!==void 0,uw=["","X","Y","Z"],K9={visibility:"hidden"},tP=1e3;let Z9=0;function dw(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function GD(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=JL(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",cn,!(r||s))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&GD(i)}function qD({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(a={},o=e==null?void 0:e()){this.id=Z9++,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,vh&&(_l.totalNodes=_l.resolvedTargetDeltas=_l.recalculatedProjection=0),this.nodes.forEach(tq),this.nodes.forEach(aq),this.nodes.forEach(oq),this.nodes.forEach(nq),vh&&window.MotionDebug.record(_l)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new U9)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new yA),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=j9(a),this.instance=a;const{layoutId:c,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(u||c)&&(this.isLayoutDirty=!0),t){let p;const m=()=>this.root.updateBlockedByResize=!1;t(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=z9(m,250),Yg.hasAnimatedSinceResize&&(Yg.hasAnimatedSinceResize=!1,this.nodes.forEach(iP))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:m,hasRelativeTargetChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||f.getDefaultTransition()||hq,{onLayoutAnimationStart:w,onLayoutAnimationComplete:x}=f.getProps(),_=!this.targetLayout||!WD(this.targetLayout,y)||g,S=!m&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||m&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,S);const M={...hA(b,"layout"),onPlay:w,onComplete:x};(f.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else m||iP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Oo(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(lq),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&GD(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const p=this.path[f];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nP);return}this.isUpdating||this.nodes.forEach(rq),this.isUpdating=!1,this.nodes.forEach(sq),this.nodes.forEach(J9),this.nodes.forEach(eq),this.clearAllSnapshots();const o=Hs.now();hi.delta=Ia(0,1e3/60,o-hi.timestamp),hi.timestamp=o,hi.isProcessing=!0,tw.update.process(hi),tw.preRender.process(hi),tw.render.process(hi),hi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nA.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(iq),this.sharedNodes.forEach(cq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,cn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){cn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=kn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!HD(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;a&&(o||bl(this.latestValues)||f)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),fq(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:o}=this.options;if(!o)return kn();const c=o.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(pq))){const{scroll:f}=this.root;f&&(yu(c.x,f.offset.x),yu(c.y,f.offset.y))}return c}removeElementScroll(a){var o;const c=kn();if(Or(c,a),!((o=this.scroll)===null||o===void 0)&&o.wasRoot)return c;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:p,options:m}=f;f!==this.root&&p&&m.layoutScroll&&(p.wasRoot&&Or(c,a),yu(c.x,p.offset.x),yu(c.y,p.offset.y))}return c}applyTransform(a,o=!1){const c=kn();Or(c,a);for(let u=0;u<this.path.length;u++){const f=this.path[u];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&vu(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),bl(f.latestValues)&&vu(c,f.latestValues)}return bl(this.latestValues)&&vu(c,this.latestValues),c}removeTransform(a){const o=kn();Or(o,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!bl(u.latestValues))continue;k1(u.latestValues)&&u.updateSnapshot();const f=kn(),p=u.measurePageBox();Or(f,p),Y2(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return bl(this.latestValues)&&Y2(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==hi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var o;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:m}=this.options;if(!(!this.layout||!(p||m))){if(this.resolvedRelativeTargetAt=hi.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kn(),this.relativeTargetOrigin=kn(),Lh(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Or(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=kn(),this.targetWithTransforms=kn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),x9(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Or(this.target,this.layout.layoutBox),jD(this.target,this.targetDelta)):Or(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kn(),this.relativeTargetOrigin=kn(),Lh(this.relativeTargetOrigin,this.target,g.target),Or(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}vh&&_l.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||k1(this.parent.latestValues)||FD(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===hi.timestamp&&(u=!1),u)return;const{layout:f,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||p))return;Or(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,g=this.treeScale.y;T9(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=kn());const{target:y}=o;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(q2(this.prevProjectionDelta.x,this.projectionDelta.x),q2(this.prevProjectionDelta.y,this.projectionDelta.y)),kh(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==g||!eP(this.projectionDelta.x,this.prevProjectionDelta.x)||!eP(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),vh&&_l.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var o;if((o=this.options.visualElement)===null||o===void 0||o.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xu(),this.projectionDelta=xu(),this.projectionDeltaWithTransform=xu()}setAnimationOrigin(a,o=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},p=xu();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const m=kn(),g=c?c.source:void 0,y=this.layout?this.layout.source:void 0,b=g!==y,w=this.getStack(),x=!w||w.members.length<=1,_=!!(b&&!x&&this.options.crossfade===!0&&!this.path.some(dq));this.animationProgress=0;let S;this.mixTargetDelta=M=>{const E=M/1e3;rP(p.x,a.x,E),rP(p.y,a.y,E),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lh(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),uq(this.relativeTarget,this.relativeTargetOrigin,m,E),S&&$9(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=kn()),Or(S,this.relativeTarget)),b&&(this.animationValues=f,V9(f,u,this.latestValues,E,_,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Oo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=cn.update(()=>{Yg.hasAnimatedSinceResize=!0,this.currentAnimation=F9(0,tP,{...a,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(tP),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:f}=a;if(!(!o||!c||!u)){if(this!==a&&this.layout&&u&&XD(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||kn();const p=Mr(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const m=Mr(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+m}Or(o,c),vu(o,f),kh(this.projectionDeltaWithTransform,this.layoutCorrected,o,f)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Y9),this.sharedNodes.get(a).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const u={};c.z&&dw("z",a,u,this.animationValues);for(let f=0;f<uw.length;f++)dw(`rotate${uw[f]}`,a,u,this.animationValues),dw(`skew${uw[f]}`,a,u,this.animationValues);a.render();for(const f in u)a.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);a.scheduleRender()}getProjectionStyles(a){var o,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return K9;const u={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Xg(a==null?void 0:a.pointerEvents)||"",u.transform=f?f(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=Xg(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!bl(this.latestValues)&&(b.transform=f?f({},""):"none",this.hasProjected=!1),b}const m=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=Q9(this.projectionDeltaWithTransform,this.treeScale,m),f&&(u.transform=f(m,u.transform));const{x:g,y}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${y.origin*100}% 0`,p.animationValues?u.opacity=p===this?(c=(o=m.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:u.opacity=p===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const b in Fx){if(m[b]===void 0)continue;const{correct:w,applyTo:x}=Fx[b],_=u.transform==="none"?m[b]:w(m[b],p);if(x){const S=x.length;for(let M=0;M<S;M++)u[x[M]]=_}else u[b]=_}return this.options.layoutId&&(u.pointerEvents=p===this?Xg(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(nP),this.root.sharedNodes.clear()}}}function J9(t){t.updateLayout()}function eq(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=t.layout,{animationType:s}=t.options,a=n.source!==t.layout.source;s==="size"?zr(p=>{const m=a?n.measuredBox[p]:n.layoutBox[p],g=Mr(m);m.min=i[p].min,m.max=m.min+g}):XD(s,n.layoutBox,i)&&zr(p=>{const m=a?n.measuredBox[p]:n.layoutBox[p],g=Mr(i[p]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[p].max=t.relativeTarget[p].min+g)});const o=xu();kh(o,i,n.layoutBox);const c=xu();a?kh(c,t.applyTransform(r,!0),n.measuredBox):kh(c,i,n.layoutBox);const u=!HD(o);let f=!1;if(!t.resumeFrom){const p=t.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:g}=p;if(m&&g){const y=kn();Lh(y,n.layoutBox,m.layoutBox);const b=kn();Lh(b,i,g.layoutBox),WD(y,b)||(f=!0),p.options.layoutRoot&&(t.relativeTarget=b,t.relativeTargetOrigin=y,t.relativeParent=p)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:c,layoutDelta:o,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function tq(t){vh&&_l.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function nq(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function iq(t){t.clearSnapshot()}function nP(t){t.clearMeasurements()}function rq(t){t.isLayoutDirty=!1}function sq(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function iP(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function aq(t){t.resolveTargetDelta()}function oq(t){t.calcProjection()}function lq(t){t.resetSkewAndRotation()}function cq(t){t.removeLeadSnapshot()}function rP(t,e,n){t.translate=vn(e.translate,0,n),t.scale=vn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function sP(t,e,n,i){t.min=vn(e.min,n.min,i),t.max=vn(e.max,n.max,i)}function uq(t,e,n,i){sP(t.x,e.x,n.x,i),sP(t.y,e.y,n.y,i)}function dq(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hq={duration:.45,ease:[.4,0,.1,1]},aP=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),oP=aP("applewebkit/")&&!aP("chrome/")?Math.round:br;function lP(t){t.min=oP(t.min),t.max=oP(t.max)}function fq(t){lP(t.x),lP(t.y)}function XD(t,e,n){return t==="position"||t==="preserve-aspect"&&!g9(J2(e),J2(n),.2)}function pq(t){var e;return t!==t.root&&((e=t.scroll)===null||e===void 0?void 0:e.wasRoot)}const mq=qD({attachResizeListener:(t,e)=>xf(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),hw={current:void 0},$D=qD({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!hw.current){const t=new mq({});t.mount(window),t.setOptions({layoutScroll:!0}),hw.current=t}return hw.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),gq={pan:{Feature:I9},drag:{Feature:R9,ProjectionNode:$D,MeasureLayout:zD}};function cP(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&cn.postRender(()=>s(e,tp(e)))}class xq extends $o{mount(){const{current:e}=this.node;e&&(this.unmount=xG(e,n=>(cP(this.node,n,"Start"),i=>cP(this.node,i,"End"))))}unmount(){}}class yq extends $o{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ep(xf(this.node.current,"focus",()=>this.onFocus()),xf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function uP(t,e,n){const{props:i}=t;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=i[r];s&&cn.postRender(()=>s(e,tp(e)))}class vq extends $o{mount(){const{current:e}=this.node;e&&(this.unmount=bG(e,n=>(uP(this.node,n,"Start"),(i,{success:r})=>uP(this.node,i,r?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const D1=new WeakMap,fw=new WeakMap,wq=t=>{const e=D1.get(t.target);e&&e(t)},bq=t=>{t.forEach(wq)};function _q({root:t,...e}){const n=t||document;fw.has(n)||fw.set(n,{});const i=fw.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(bq,{root:t,...e})),i[r]}function Sq(t,e,n){const i=_q(e);return D1.set(t,n),i.observe(t),()=>{D1.delete(t),i.unobserve(t)}}const Aq={some:0,all:1};class Mq extends $o{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=e,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:Aq[r]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:p}=this.node.getProps(),m=u?f:p;m&&m(c)};return Sq(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Tq(e,n))&&this.startObserver()}unmount(){}}function Tq({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Eq={inView:{Feature:Mq},tap:{Feature:vq},focus:{Feature:yq},hover:{Feature:xq}},Cq={layout:{ProjectionNode:$D,MeasureLayout:zD}},F1={current:null},YD={current:!1};function Pq(){if(YD.current=!0,!!KS)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>F1.current=t.matches;t.addListener(e),e()}else F1.current=!1}const Nq=[...wD,Ti,Uo],Rq=t=>Nq.find(vD(t)),dP=new WeakMap;function Iq(t,e,n){for(const i in e){const r=e[i],s=n[i];if(Pi(r))t.addValue(i,r);else if(Pi(s))t.addValue(i,mf(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,mf(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const hP=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kq{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=AA,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 g=Hs.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,cn.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:f}=a;this.onUpdate=f,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!s,this.isControllingVariants=Ry(n),this.isVariantNode=CL(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:p,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in m){const y=m[g];c[g]!==void 0&&Pi(y)&&y.set(c[g],!1)}}mount(e){this.current=e,dP.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),YD.current||Pq(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:F1.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){dP.delete(this.current),this.projection&&this.projection.unmount(),Oo(this.notifyUpdate),Oo(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const i=cc.has(e),r=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&cn.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ju){const n=Ju[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<hP.length;i++){const r=hP[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=e[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=Iq(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=mf(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){var i;let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(i=this.getBaseTargetFromProps(this.props,e))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(xD(r)||lD(r))?r=parseFloat(r):!Rq(r)&&Uo.test(n)&&(r=pD(e,n)),this.setBaseTarget(e,Pi(r)?r.get():r)),Pi(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:i}=this.props;let r;if(typeof i=="string"||typeof i=="object"){const a=rA(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[e])}if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Pi(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new yA),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class QD extends kq{constructor(){super(...arguments),this.KeyframeResolver=bD}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Pi(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Lq(t){return window.getComputedStyle(t)}class Dq extends QD{constructor(){super(...arguments),this.type="html",this.renderInstance=jL}readValueFromInstance(e,n){if(cc.has(n)){const i=SA(n);return i&&i.default||0}else{const i=Lq(e),r=(LL(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return OD(e,n)}build(e,n,i){oA(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return dA(e,n,i)}}class Fq extends QD{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kn}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(cc.has(n)){const i=SA(n);return i&&i.default||0}return n=OL.has(n)?n:tA(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return BL(e,n,i)}build(e,n,i){lA(e,n,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,i,r){UL(e,n,i,r)}mount(e){this.isSVGTag=uA(e.tagName),super.mount(e)}}const jq=(t,e)=>iA(t)?new Fq(e):new Dq(e,{allowProjection:t!==I.Fragment}),Oq=uG({...o9,...Eq,...gq,...Cq},jq),me=MW(Oq),KD="/assets/lexic-logo-D6T1P0bO.png",ZD=I.createContext(null),Uq=({children:t})=>{const[e,n]=I.useState(!1),i=()=>{n(!0),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"contact_click",eventCategory:"CTA",eventAction:"click",eventLabel:"Contact"})};return l.jsx(ZD.Provider,{value:{isOpen:e,openModal:i,closeModal:()=>n(!1)},children:t})},JD=()=>{const t=I.useContext(ZD);if(!t)throw new Error("useBookingModal must be used inside BookingModalProvider");return t},fP=[{label:"About",type:"route",path:"/about"},{label:"Solutions",type:"route",path:"/solutions"},{label:"Platform",type:"route",path:"/platform"},{label:"The Signal",type:"route",path:"/signal"}],un=()=>{const[t,e]=I.useState(!1),[n,i]=I.useState(!1),r=Kf(),s=Xo(),{openModal:a}=JD(),o=s.pathname==="/about",c=(s.pathname==="/"||o)&&!t,u=o&&!t&&!n;I.useEffect(()=>{const p=()=>e(window.scrollY>60);return window.addEventListener("scroll",p,{passive:!0}),()=>window.removeEventListener("scroll",p)},[]);const f=p=>{var m;i(!1),p.type==="route"?r(p.path):s.pathname!=="/"?(r("/"),setTimeout(()=>{var g;return(g=document.getElementById(p.id))==null?void 0:g.scrollIntoView({behavior:"smooth"})},100)):(m=document.getElementById(p.id))==null||m.scrollIntoView({behavior:"smooth"})};return l.jsxs("header",{className:`fixed top-0 left-0 w-full z-50 transition-colors duration-500 ${t||n?"bg-[#150835]":"bg-transparent"}`,style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between px-6 md:px-12 h-16 md:h-20",children:[l.jsx("img",{src:KD,alt:"Lexic.AI",className:"h-8 md:h-10 w-auto cursor-pointer",onClick:()=>r("/"),style:{filter:c?"none":"brightness(0) invert(1)"}}),l.jsxs("nav",{className:"hidden md:flex items-center gap-8",children:[fP.map(p=>l.jsx("button",{onClick:()=>f(p),className:`${u?"text-[#150835]/70 hover:text-[#150835]":"text-white/70 hover:text-white"} text-sm font-medium tracking-wide uppercase transition-colors duration-200`,children:p.label},p.label)),l.jsxs("button",{onClick:a,className:`group flex items-center gap-2 border rounded-full px-6 py-2 text-xs font-medium uppercase tracking-[0.2em] transition-colors duration-300 ${u?"border-[#150835]/40 text-[#150835] hover:bg-[#150835] hover:text-white":"border-white/40 text-white hover:bg-white hover:text-[#150835]"}`,children:["Contact",l.jsx(qr,{size:14,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})]}),l.jsx("button",{className:`md:hidden ${u?"text-[#150835]":"text-white"} p-1`,onClick:()=>i(!n),"aria-label":"Toggle menu",children:n?l.jsx(nc,{size:24}):l.jsx(NB,{size:24})})]}),l.jsx(Vl,{children:n&&l.jsx(me.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden bg-[#150835] overflow-hidden",children:l.jsxs("nav",{className:"flex flex-col items-center gap-6 py-8",children:[fP.map(p=>l.jsx("button",{onClick:()=>f(p),className:"text-white/70 hover:text-white text-sm font-medium tracking-wide uppercase transition-colors",children:p.label},p.label)),l.jsxs("button",{onClick:a,className:"group flex items-center gap-2 border border-white/40 rounded-full px-6 py-2 text-xs font-medium uppercase tracking-[0.2em] text-white hover:bg-white hover:text-[#150835] transition-colors duration-300",children:["Contact",l.jsx(qr,{size:14})]})]})})})]})},pP="https://lexic.ai",mn=({title:t,description:e,ogImage:n})=>{const{pathname:i}=Xo();return I.useEffect(()=>{document.title=t;const r=`${pP}${i==="/"?"":i}`,s=n||`${pP}/favicon.png`,a=(c,u,f)=>{let p=document.querySelector(`meta[${c}="${u}"]`);p&&p.setAttribute("content",f)};let o=document.querySelector('link[rel="canonical"]');o?o.href=r:(o=document.createElement("link"),o.rel="canonical",o.href=r,document.head.appendChild(o)),a("name","description",e),a("property","og:title",t),a("property","og:description",e),a("property","og:url",r),a("property","og:image",s),a("name","twitter:title",t),a("name","twitter:description",e),a("name","twitter:image",s)},[t,e,i,n]),null};/**
* @license
* Copyright 2010-2023 Three.js Authors
* SPDX-License-Identifier: MIT
*/const Ly="160",zq={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Bq={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},eF=0,j1=1,tF=2,Vq=3,nF=0,Dy=1,Dh=2,ss=3,ka=0,Vi=1,js=2,Hq=2,Ma=0,Wl=1,O1=2,U1=3,z1=4,iF=5,ho=100,rF=101,sF=102,B1=103,V1=104,aF=200,oF=201,lF=202,cF=203,Vx=204,Hx=205,uF=206,dF=207,hF=208,fF=209,pF=210,mF=211,gF=212,xF=213,yF=214,vF=0,wF=1,bF=2,yf=3,_F=4,SF=5,AF=6,MF=7,np=0,TF=1,EF=2,Ws=0,CF=1,PF=2,NF=3,CA=4,RF=5,IF=6,H1="attached",kF="detached",Fy=300,La=301,zo=302,vf=303,wf=304,yd=306,bf=1e3,Ci=1001,_f=1002,Ln=1003,Wx=1004,Wq=1004,Fh=1005,Gq=1005,jn=1006,PA=1007,qq=1007,Bo=1008,Xq=1008,Gs=1009,LF=1010,DF=1011,jy=1012,NA=1013,wa=1014,ds=1015,td=1016,RA=1017,IA=1018,No=1020,FF=1021,zi=1023,jF=1024,OF=1025,Ro=1026,rc=1027,UF=1028,kA=1029,zF=1030,LA=1031,DA=1033,Qg=33776,Kg=33777,Zg=33778,Jg=33779,W1=35840,G1=35841,q1=35842,X1=35843,FA=36196,$1=37492,Y1=37496,Q1=37808,K1=37809,Z1=37810,J1=37811,e_=37812,t_=37813,n_=37814,i_=37815,r_=37816,s_=37817,a_=37818,o_=37819,l_=37820,c_=37821,ex=36492,u_=36494,d_=36495,BF=36283,h_=36284,f_=36285,p_=36286,VF=2200,HF=2201,WF=2202,Sf=2300,Af=2301,tx=2302,Nl=2400,Rl=2401,Mf=2402,Oy=2500,jA=2501,$q=0,Yq=1,Qq=2,OA=3e3,Io=3001,GF=3200,qF=3201,Yo=0,XF=1,xr="",qn="srgb",Ys="srgb-linear",Uy="display-p3",ip="display-p3-linear",Tf="linear",en="srgb",Ef="rec709",Cf="p3",Kq=0,Sl=7680,Zq=7681,Jq=7682,eX=7683,tX=34055,nX=34056,iX=5386,rX=512,sX=513,aX=514,oX=515,lX=516,cX=517,uX=518,m_=519,$F=512,YF=513,QF=514,UA=515,KF=516,ZF=517,JF=518,ej=519,Pf=35044,dX=35048,hX=35040,fX=35045,pX=35049,mX=35041,gX=35046,xX=35050,yX=35042,vX="100",g_="300 es",Gx=1035,hs=2e3,nd=2001;class Oa{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,a=r.length;s<a;s++)r[s].call(this,e);e.target=null}}}const _i=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let mP=1234567;const Gl=Math.PI/180,id=180/Math.PI;function _r(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(_i[t&255]+_i[t>>8&255]+_i[t>>16&255]+_i[t>>24&255]+"-"+_i[e&255]+_i[e>>8&255]+"-"+_i[e>>16&15|64]+_i[e>>24&255]+"-"+_i[n&63|128]+_i[n>>8&255]+"-"+_i[n>>16&255]+_i[n>>24&255]+_i[i&255]+_i[i>>8&255]+_i[i>>16&255]+_i[i>>24&255]).toLowerCase()}function Pn(t,e,n){return Math.max(e,Math.min(n,t))}function zA(t,e){return(t%e+e)%e}function wX(t,e,n,i,r){return i+(t-e)*(r-i)/(n-e)}function bX(t,e,n){return t!==e?(n-t)/(e-t):0}function jh(t,e,n){return(1-n)*t+n*e}function _X(t,e,n,i){return jh(t,e,1-Math.exp(-n*i))}function SX(t,e=1){return e-Math.abs(zA(t,e*2)-e)}function AX(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function MX(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function TX(t,e){return t+Math.floor(Math.random()*(e-t+1))}function EX(t,e){return t+Math.random()*(e-t)}function CX(t){return t*(.5-Math.random())}function PX(t){t!==void 0&&(mP=t);let e=mP+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function NX(t){return t*Gl}function RX(t){return t*id}function x_(t){return(t&t-1)===0&&t!==0}function IX(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function qx(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function kX(t,e,n,i,r){const s=Math.cos,a=Math.sin,o=s(n/2),c=a(n/2),u=s((e+i)/2),f=a((e+i)/2),p=s((e-i)/2),m=a((e-i)/2),g=s((i-e)/2),y=a((i-e)/2);switch(r){case"XYX":t.set(o*f,c*p,c*m,o*u);break;case"YZY":t.set(c*m,o*f,c*p,o*u);break;case"ZXZ":t.set(c*p,c*m,o*f,o*u);break;case"XZX":t.set(o*f,c*y,c*g,o*u);break;case"YXY":t.set(c*g,o*f,c*y,o*u);break;case"ZYZ":t.set(c*y,c*g,o*f,o*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function tr(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function Et(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const LX={DEG2RAD:Gl,RAD2DEG:id,generateUUID:_r,clamp:Pn,euclideanModulo:zA,mapLinear:wX,inverseLerp:bX,lerp:jh,damp:_X,pingpong:SX,smoothstep:AX,smootherstep:MX,randInt:TX,randFloat:EX,randFloatSpread:CX,seededRandom:PX,degToRad:NX,radToDeg:RX,isPowerOfTwo:x_,ceilPowerOfTwo:IX,floorPowerOfTwo:qx,setQuaternionFromProperEuler:kX,normalize:Et,denormalize:tr};class ye{constructor(e=0,n=0){ye.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,i=this.y,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6],this.y=r[1]*n+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Pn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),r=Math.sin(n),s=this.x-e.x,a=this.y-e.y;return this.x=s*i-a*r+e.x,this.y=s*r+a*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Pt{constructor(e,n,i,r,s,a,o,c,u){Pt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,a,o,c,u)}set(e,n,i,r,s,a,o,c,u){const f=this.elements;return f[0]=e,f[1]=r,f[2]=o,f[3]=n,f[4]=s,f[5]=c,f[6]=i,f[7]=a,f[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,a=i[0],o=i[3],c=i[6],u=i[1],f=i[4],p=i[7],m=i[2],g=i[5],y=i[8],b=r[0],w=r[3],x=r[6],_=r[1],S=r[4],M=r[7],E=r[2],C=r[5],N=r[8];return s[0]=a*b+o*_+c*E,s[3]=a*w+o*S+c*C,s[6]=a*x+o*M+c*N,s[1]=u*b+f*_+p*E,s[4]=u*w+f*S+p*C,s[7]=u*x+f*M+p*N,s[2]=m*b+g*_+y*E,s[5]=m*w+g*S+y*C,s[8]=m*x+g*M+y*N,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],c=e[6],u=e[7],f=e[8];return n*a*f-n*o*u-i*s*f+i*o*c+r*s*u-r*a*c}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],c=e[6],u=e[7],f=e[8],p=f*a-o*u,m=o*c-f*s,g=u*s-a*c,y=n*p+i*m+r*g;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const b=1/y;return e[0]=p*b,e[1]=(r*u-f*i)*b,e[2]=(o*i-r*a)*b,e[3]=m*b,e[4]=(f*n-r*c)*b,e[5]=(r*s-o*n)*b,e[6]=g*b,e[7]=(i*c-u*n)*b,e[8]=(a*n-i*s)*b,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,r,s,a,o){const c=Math.cos(s),u=Math.sin(s);return this.set(i*c,i*u,-i*(c*a+u*o)+a+e,-r*u,r*c,-r*(-u*a+c*o)+o+n,0,0,1),this}scale(e,n){return this.premultiply(pw.makeScale(e,n)),this}rotate(e){return this.premultiply(pw.makeRotation(-e)),this}translate(e,n){return this.premultiply(pw.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<9;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const pw=new Pt;function tj(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}const DX={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function wu(t,e){return new DX[t](e)}function Nf(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function nj(){const t=Nf("canvas");return t.style.display="block",t}const gP={};function Oh(t){t in gP||(gP[t]=!0,console.warn(t))}const xP=new Pt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),yP=new Pt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),jm={[Ys]:{transfer:Tf,primaries:Ef,toReference:t=>t,fromReference:t=>t},[qn]:{transfer:en,primaries:Ef,toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},[ip]:{transfer:Tf,primaries:Cf,toReference:t=>t.applyMatrix3(yP),fromReference:t=>t.applyMatrix3(xP)},[Uy]:{transfer:en,primaries:Cf,toReference:t=>t.convertSRGBToLinear().applyMatrix3(yP),fromReference:t=>t.applyMatrix3(xP).convertLinearToSRGB()}},FX=new Set([Ys,ip]),$t={enabled:!0,_workingColorSpace:Ys,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!FX.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(this.enabled===!1||e===n||!e||!n)return t;const i=jm[e].toReference,r=jm[n].fromReference;return r(i(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return jm[t].primaries},getTransfer:function(t){return t===xr?Tf:jm[t].transfer}};function Lu(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function mw(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let Ic;class BA{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Ic===void 0&&(Ic=Nf("canvas")),Ic.width=e.width,Ic.height=e.height;const i=Ic.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Ic}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=Nf("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let a=0;a<s.length;a++)s[a]=Lu(s[a]/255)*255;return i.putImageData(r,0,0),n}else if(e.data){const n=e.data.slice(0);for(let i=0;i<n.length;i++)n instanceof Uint8Array||n instanceof Uint8ClampedArray?n[i]=Math.floor(Lu(n[i]/255)*255):n[i]=Lu(n[i]);return{data:n,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let jX=0;class Il{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:jX++}),this.uuid=_r(),this.data=e,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const i={uuid:this.uuid,url:""},r=this.data;if(r!==null){let s;if(Array.isArray(r)){s=[];for(let a=0,o=r.length;a<o;a++)r[a].isDataTexture?s.push(gw(r[a].image)):s.push(gw(r[a]))}else s=gw(r);i.url=s}return n||(e.images[this.uuid]=i),i}}function gw(t){return typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap?BA.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let OX=0;class Un extends Oa{constructor(e=Un.DEFAULT_IMAGE,n=Un.DEFAULT_MAPPING,i=Ci,r=Ci,s=jn,a=Bo,o=zi,c=Gs,u=Un.DEFAULT_ANISOTROPY,f=xr){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:OX++}),this.uuid=_r(),this.name="",this.source=new Il(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=i,this.wrapT=r,this.magFilter=s,this.minFilter=a,this.anisotropy=u,this.format=o,this.internalFormat=null,this.type=c,this.offset=new ye(0,0),this.repeat=new ye(1,1),this.center=new ye(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Pt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof f=="string"?this.colorSpace=f:(Oh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=f===Io?qn:xr),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Fy)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case bf:e.x=e.x-Math.floor(e.x);break;case Ci:e.x=e.x<0?0:1;break;case _f:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case bf:e.y=e.y-Math.floor(e.y);break;case Ci:e.y=e.y<0?0:1;break;case _f:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Oh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===qn?Io:OA}set encoding(e){Oh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Io?qn:xr}}Un.DEFAULT_IMAGE=null;Un.DEFAULT_MAPPING=Fy;Un.DEFAULT_ANISOTROPY=1;class Yt{constructor(e=0,n=0,i=0,r=1){Yt.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,r){return this.x=e,this.y=n,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=this.w,a=e.elements;return this.x=a[0]*n+a[4]*i+a[8]*r+a[12]*s,this.y=a[1]*n+a[5]*i+a[9]*r+a[13]*s,this.z=a[2]*n+a[6]*i+a[10]*r+a[14]*s,this.w=a[3]*n+a[7]*i+a[11]*r+a[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,r,s;const c=e.elements,u=c[0],f=c[4],p=c[8],m=c[1],g=c[5],y=c[9],b=c[2],w=c[6],x=c[10];if(Math.abs(f-m)<.01&&Math.abs(p-b)<.01&&Math.abs(y-w)<.01){if(Math.abs(f+m)<.1&&Math.abs(p+b)<.1&&Math.abs(y+w)<.1&&Math.abs(u+g+x-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const S=(u+1)/2,M=(g+1)/2,E=(x+1)/2,C=(f+m)/4,N=(p+b)/4,D=(y+w)/4;return S>M&&S>E?S<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(S),r=C/i,s=N/i):M>E?M<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(M),i=C/r,s=D/r):E<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(E),i=N/s,r=D/s),this.set(i,r,s,n),this}let _=Math.sqrt((w-y)*(w-y)+(p-b)*(p-b)+(m-f)*(m-f));return Math.abs(_)<.001&&(_=1),this.x=(w-y)/_,this.y=(p-b)/_,this.z=(m-f)/_,this.w=Math.acos((u+g+x-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this.w=Math.max(e.w,Math.min(n.w,this.w)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this.w=Math.max(e,Math.min(n,this.w)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class ij extends Oa{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Yt(0,0,e,n),this.scissorTest=!1,this.viewport=new Yt(0,0,e,n);const r={width:e,height:n,depth:1};i.encoding!==void 0&&(Oh("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),i.colorSpace=i.encoding===Io?qn:xr),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:jn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},i),this.texture=new Un(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps,this.texture.internalFormat=i.internalFormat,this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}setSize(e,n,i=1){(this.width!==e||this.height!==n||this.depth!==i)&&(this.width=e,this.height=n,this.depth=i,this.texture.image.width=e,this.texture.image.height=n,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const n=Object.assign({},e.texture.image);return this.texture.source=new Il(n),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class ys extends ij{constructor(e=1,n=1,i={}){super(e,n,i),this.isWebGLRenderTarget=!0}}class zy extends Un{constructor(e=null,n=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=Ln,this.minFilter=Ln,this.wrapR=Ci,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class UX extends ys{constructor(e=1,n=1,i=1,r={}){super(e,n,r),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new zy(null,e,n,i),this.texture.isRenderTargetTexture=!0}}class VA extends Un{constructor(e=null,n=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:n,height:i,depth:r},this.magFilter=Ln,this.minFilter=Ln,this.wrapR=Ci,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class zX extends ys{constructor(e=1,n=1,i=1,r={}){super(e,n,r),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new VA(null,e,n,i),this.texture.isRenderTargetTexture=!0}}class BX extends ys{constructor(e=1,n=1,i=1,r={}){super(e,n,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let a=0;a<i;a++)this.texture[a]=s.clone(),this.texture[a].isRenderTargetTexture=!0}setSize(e,n,i=1){if(this.width!==e||this.height!==n||this.depth!==i){this.width=e,this.height=n,this.depth=i;for(let r=0,s=this.texture.length;r<s;r++)this.texture[r].image.width=e,this.texture[r].image.height=n,this.texture[r].image.depth=i;this.dispose()}this.viewport.set(0,0,e,n),this.scissor.set(0,0,e,n)}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let n=0,i=e.texture.length;n<i;n++)this.texture[n]=e.texture[n].clone(),this.texture[n].isRenderTargetTexture=!0;return this}}class ar{constructor(e=0,n=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=n,this._z=i,this._w=r}static slerpFlat(e,n,i,r,s,a,o){let c=i[r+0],u=i[r+1],f=i[r+2],p=i[r+3];const m=s[a+0],g=s[a+1],y=s[a+2],b=s[a+3];if(o===0){e[n+0]=c,e[n+1]=u,e[n+2]=f,e[n+3]=p;return}if(o===1){e[n+0]=m,e[n+1]=g,e[n+2]=y,e[n+3]=b;return}if(p!==b||c!==m||u!==g||f!==y){let w=1-o;const x=c*m+u*g+f*y+p*b,_=x>=0?1:-1,S=1-x*x;if(S>Number.EPSILON){const E=Math.sqrt(S),C=Math.atan2(E,x*_);w=Math.sin(w*C)/E,o=Math.sin(o*C)/E}const M=o*_;if(c=c*w+m*M,u=u*w+g*M,f=f*w+y*M,p=p*w+b*M,w===1-o){const E=1/Math.sqrt(c*c+u*u+f*f+p*p);c*=E,u*=E,f*=E,p*=E}}e[n]=c,e[n+1]=u,e[n+2]=f,e[n+3]=p}static multiplyQuaternionsFlat(e,n,i,r,s,a){const o=i[r],c=i[r+1],u=i[r+2],f=i[r+3],p=s[a],m=s[a+1],g=s[a+2],y=s[a+3];return e[n]=o*y+f*p+c*g-u*m,e[n+1]=c*y+f*m+u*p-o*g,e[n+2]=u*y+f*g+o*m-c*p,e[n+3]=f*y-o*p-c*m-u*g,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,r){return this._x=e,this._y=n,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const i=e._x,r=e._y,s=e._z,a=e._order,o=Math.cos,c=Math.sin,u=o(i/2),f=o(r/2),p=o(s/2),m=c(i/2),g=c(r/2),y=c(s/2);switch(a){case"XYZ":this._x=m*f*p+u*g*y,this._y=u*g*p-m*f*y,this._z=u*f*y+m*g*p,this._w=u*f*p-m*g*y;break;case"YXZ":this._x=m*f*p+u*g*y,this._y=u*g*p-m*f*y,this._z=u*f*y-m*g*p,this._w=u*f*p+m*g*y;break;case"ZXY":this._x=m*f*p-u*g*y,this._y=u*g*p+m*f*y,this._z=u*f*y+m*g*p,this._w=u*f*p-m*g*y;break;case"ZYX":this._x=m*f*p-u*g*y,this._y=u*g*p+m*f*y,this._z=u*f*y-m*g*p,this._w=u*f*p+m*g*y;break;case"YZX":this._x=m*f*p+u*g*y,this._y=u*g*p+m*f*y,this._z=u*f*y-m*g*p,this._w=u*f*p-m*g*y;break;case"XZY":this._x=m*f*p-u*g*y,this._y=u*g*p-m*f*y,this._z=u*f*y+m*g*p,this._w=u*f*p+m*g*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],r=n[4],s=n[8],a=n[1],o=n[5],c=n[9],u=n[2],f=n[6],p=n[10],m=i+o+p;if(m>0){const g=.5/Math.sqrt(m+1);this._w=.25/g,this._x=(f-c)*g,this._y=(s-u)*g,this._z=(a-r)*g}else if(i>o&&i>p){const g=2*Math.sqrt(1+i-o-p);this._w=(f-c)/g,this._x=.25*g,this._y=(r+a)/g,this._z=(s+u)/g}else if(o>p){const g=2*Math.sqrt(1+o-i-p);this._w=(s-u)/g,this._x=(r+a)/g,this._y=.25*g,this._z=(c+f)/g}else{const g=2*Math.sqrt(1+p-i-o);this._w=(a-r)/g,this._x=(s+u)/g,this._y=(c+f)/g,this._z=.25*g}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return i<Number.EPSILON?(i=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Pn(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,n/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,r=e._y,s=e._z,a=e._w,o=n._x,c=n._y,u=n._z,f=n._w;return this._x=i*f+a*o+r*u-s*c,this._y=r*f+a*c+s*o-i*u,this._z=s*f+a*u+i*c-r*o,this._w=a*f-i*o-r*c-s*u,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,a=this._w;let o=a*e._w+i*e._x+r*e._y+s*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=i,this._y=r,this._z=s,this;const c=1-o*o;if(c<=Number.EPSILON){const g=1-n;return this._w=g*a+n*this._w,this._x=g*i+n*this._x,this._y=g*r+n*this._y,this._z=g*s+n*this._z,this.normalize(),this}const u=Math.sqrt(c),f=Math.atan2(u,o),p=Math.sin((1-n)*f)/u,m=Math.sin(n*f)/u;return this._w=a*p+this._w*m,this._x=i*p+this._x*m,this._y=r*p+this._y*m,this._z=s*p+this._z*m,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=Math.random(),n=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(n*Math.cos(r),i*Math.sin(s),i*Math.cos(s),n*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class H{constructor(e=0,n=0,i=0){H.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(vP.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(vP.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6]*r,this.y=s[1]*n+s[4]*i+s[7]*r,this.z=s[2]*n+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,r=this.z,s=e.elements,a=1/(s[3]*n+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*n+s[4]*i+s[8]*r+s[12])*a,this.y=(s[1]*n+s[5]*i+s[9]*r+s[13])*a,this.z=(s[2]*n+s[6]*i+s[10]*r+s[14])*a,this}applyQuaternion(e){const n=this.x,i=this.y,r=this.z,s=e.x,a=e.y,o=e.z,c=e.w,u=2*(a*r-o*i),f=2*(o*n-s*r),p=2*(s*i-a*n);return this.x=n+c*u+a*p-o*f,this.y=i+c*f+o*u-s*p,this.z=r+c*p+s*f-a*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*n+s[4]*i+s[8]*r,this.y=s[1]*n+s[5]*i+s[9]*r,this.z=s[2]*n+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,r=e.y,s=e.z,a=n.x,o=n.y,c=n.z;return this.x=r*c-s*o,this.y=s*a-i*c,this.z=i*o-r*a,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return xw.copy(this).projectOnVector(e),this.sub(xw)}reflect(e){return this.sub(xw.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Pn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return n*n+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const r=Math.sin(n)*e;return this.x=r*Math.sin(i),this.y=Math.cos(n)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=r,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,n=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(n),this.y=i*Math.sin(n),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const xw=new H,vP=new ar;class Hi{constructor(e=new H(1/0,1/0,1/0),n=new H(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n+=3)this.expandByPoint(Jr.fromArray(e,n));return this}setFromBufferAttribute(e){this.makeEmpty();for(let n=0,i=e.count;n<i;n++)this.expandByPoint(Jr.fromBufferAttribute(e,n));return this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=Jr.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}setFromObject(e,n=!1){return this.makeEmpty(),this.expandByObject(e,n)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,n=!1){e.updateWorldMatrix(!1,!1);const i=e.geometry;if(i!==void 0){const s=i.getAttribute("position");if(n===!0&&s!==void 0&&e.isInstancedMesh!==!0)for(let a=0,o=s.count;a<o;a++)e.isMesh===!0?e.getVertexPosition(a,Jr):Jr.fromBufferAttribute(s,a),Jr.applyMatrix4(e.matrixWorld),this.expandByPoint(Jr);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Om.copy(e.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),Om.copy(i.boundingBox)),Om.applyMatrix4(e.matrixWorld),this.union(Om)}const r=e.children;for(let s=0,a=r.length;s<a;s++)this.expandByObject(r[s],n);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Jr),Jr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(eh),Um.subVectors(this.max,eh),kc.subVectors(e.a,eh),Lc.subVectors(e.b,eh),Dc.subVectors(e.c,eh),Ka.subVectors(Lc,kc),Za.subVectors(Dc,Lc),cl.subVectors(kc,Dc);let n=[0,-Ka.z,Ka.y,0,-Za.z,Za.y,0,-cl.z,cl.y,Ka.z,0,-Ka.x,Za.z,0,-Za.x,cl.z,0,-cl.x,-Ka.y,Ka.x,0,-Za.y,Za.x,0,-cl.y,cl.x,0];return!yw(n,kc,Lc,Dc,Um)||(n=[1,0,0,0,1,0,0,0,1],!yw(n,kc,Lc,Dc,Um))?!1:(zm.crossVectors(Ka,Za),n=[zm.x,zm.y,zm.z],yw(n,kc,Lc,Dc,Um))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Jr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Jr).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(aa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),aa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),aa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),aa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),aa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),aa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),aa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),aa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(aa),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const aa=[new H,new H,new H,new H,new H,new H,new H,new H],Jr=new H,Om=new Hi,kc=new H,Lc=new H,Dc=new H,Ka=new H,Za=new H,cl=new H,eh=new H,Um=new H,zm=new H,ul=new H;function yw(t,e,n,i,r){for(let s=0,a=t.length-3;s<=a;s+=3){ul.fromArray(t,s);const o=r.x*Math.abs(ul.x)+r.y*Math.abs(ul.y)+r.z*Math.abs(ul.z),c=e.dot(ul),u=n.dot(ul),f=i.dot(ul);if(Math.max(-Math.max(c,u,f),Math.min(c,u,f))>o)return!1}return!0}const VX=new Hi,th=new H,vw=new H;class Ni{constructor(e=new H,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):VX.setFromPoints(e).getCenter(i);let r=0;for(let s=0,a=e.length;s<a;s++)r=Math.max(r,i.distanceToSquared(e[s]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const n=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=n*n}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,n){const i=this.center.distanceToSquared(e);return n.copy(e),i>this.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;th.subVectors(e,this.center);const n=th.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),r=(i-this.radius)*.5;this.center.addScaledVector(th,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(vw.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(th.copy(e.center).add(vw)),this.expandByPoint(th.copy(e.center).sub(vw))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const oa=new H,ww=new H,Bm=new H,Ja=new H,bw=new H,Vm=new H,_w=new H;class vd{constructor(e=new H,n=new H(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,oa)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=oa.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(oa.copy(this.origin).addScaledVector(this.direction,n),oa.distanceToSquared(e))}distanceSqToSegment(e,n,i,r){ww.copy(e).add(n).multiplyScalar(.5),Bm.copy(n).sub(e).normalize(),Ja.copy(this.origin).sub(ww);const s=e.distanceTo(n)*.5,a=-this.direction.dot(Bm),o=Ja.dot(this.direction),c=-Ja.dot(Bm),u=Ja.lengthSq(),f=Math.abs(1-a*a);let p,m,g,y;if(f>0)if(p=a*c-o,m=a*o-c,y=s*f,p>=0)if(m>=-y)if(m<=y){const b=1/f;p*=b,m*=b,g=p*(p+a*m+2*o)+m*(a*p+m+2*c)+u}else m=s,p=Math.max(0,-(a*m+o)),g=-p*p+m*(m+2*c)+u;else m=-s,p=Math.max(0,-(a*m+o)),g=-p*p+m*(m+2*c)+u;else m<=-y?(p=Math.max(0,-(-a*s+o)),m=p>0?-s:Math.min(Math.max(-s,-c),s),g=-p*p+m*(m+2*c)+u):m<=y?(p=0,m=Math.min(Math.max(-s,-c),s),g=m*(m+2*c)+u):(p=Math.max(0,-(a*s+o)),m=p>0?s:Math.min(Math.max(-s,-c),s),g=-p*p+m*(m+2*c)+u);else m=a>0?-s:s,p=Math.max(0,-(a*m+o)),g=-p*p+m*(m+2*c)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,p),r&&r.copy(ww).addScaledVector(Bm,m),g}intersectSphere(e,n){oa.subVectors(e.center,this.origin);const i=oa.dot(this.direction),r=oa.dot(oa)-i*i,s=e.radius*e.radius;if(r>s)return null;const a=Math.sqrt(s-r),o=i-a,c=i+a;return c<0?null:o<0?this.at(c,n):this.at(o,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,r,s,a,o,c;const u=1/this.direction.x,f=1/this.direction.y,p=1/this.direction.z,m=this.origin;return u>=0?(i=(e.min.x-m.x)*u,r=(e.max.x-m.x)*u):(i=(e.max.x-m.x)*u,r=(e.min.x-m.x)*u),f>=0?(s=(e.min.y-m.y)*f,a=(e.max.y-m.y)*f):(s=(e.max.y-m.y)*f,a=(e.min.y-m.y)*f),i>a||s>r||((s>i||isNaN(i))&&(i=s),(a<r||isNaN(r))&&(r=a),p>=0?(o=(e.min.z-m.z)*p,c=(e.max.z-m.z)*p):(o=(e.max.z-m.z)*p,c=(e.min.z-m.z)*p),i>c||o>r)||((o>i||i!==i)&&(i=o),(c<r||r!==r)&&(r=c),r<0)?null:this.at(i>=0?i:r,n)}intersectsBox(e){return this.intersectBox(e,oa)!==null}intersectTriangle(e,n,i,r,s){bw.subVectors(n,e),Vm.subVectors(i,e),_w.crossVectors(bw,Vm);let a=this.direction.dot(_w),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Ja.subVectors(this.origin,e);const c=o*this.direction.dot(Vm.crossVectors(Ja,Vm));if(c<0)return null;const u=o*this.direction.dot(bw.cross(Ja));if(u<0||c+u>a)return null;const f=-o*Ja.dot(_w);return f<0?null:this.at(f/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class pt{constructor(e,n,i,r,s,a,o,c,u,f,p,m,g,y,b,w){pt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,i,r,s,a,o,c,u,f,p,m,g,y,b,w)}set(e,n,i,r,s,a,o,c,u,f,p,m,g,y,b,w){const x=this.elements;return x[0]=e,x[4]=n,x[8]=i,x[12]=r,x[1]=s,x[5]=a,x[9]=o,x[13]=c,x[2]=u,x[6]=f,x[10]=p,x[14]=m,x[3]=g,x[7]=y,x[11]=b,x[15]=w,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new pt().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,r=1/Fc.setFromMatrixColumn(e,0).length(),s=1/Fc.setFromMatrixColumn(e,1).length(),a=1/Fc.setFromMatrixColumn(e,2).length();return n[0]=i[0]*r,n[1]=i[1]*r,n[2]=i[2]*r,n[3]=0,n[4]=i[4]*s,n[5]=i[5]*s,n[6]=i[6]*s,n[7]=0,n[8]=i[8]*a,n[9]=i[9]*a,n[10]=i[10]*a,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,r=e.y,s=e.z,a=Math.cos(i),o=Math.sin(i),c=Math.cos(r),u=Math.sin(r),f=Math.cos(s),p=Math.sin(s);if(e.order==="XYZ"){const m=a*f,g=a*p,y=o*f,b=o*p;n[0]=c*f,n[4]=-c*p,n[8]=u,n[1]=g+y*u,n[5]=m-b*u,n[9]=-o*c,n[2]=b-m*u,n[6]=y+g*u,n[10]=a*c}else if(e.order==="YXZ"){const m=c*f,g=c*p,y=u*f,b=u*p;n[0]=m+b*o,n[4]=y*o-g,n[8]=a*u,n[1]=a*p,n[5]=a*f,n[9]=-o,n[2]=g*o-y,n[6]=b+m*o,n[10]=a*c}else if(e.order==="ZXY"){const m=c*f,g=c*p,y=u*f,b=u*p;n[0]=m-b*o,n[4]=-a*p,n[8]=y+g*o,n[1]=g+y*o,n[5]=a*f,n[9]=b-m*o,n[2]=-a*u,n[6]=o,n[10]=a*c}else if(e.order==="ZYX"){const m=a*f,g=a*p,y=o*f,b=o*p;n[0]=c*f,n[4]=y*u-g,n[8]=m*u+b,n[1]=c*p,n[5]=b*u+m,n[9]=g*u-y,n[2]=-u,n[6]=o*c,n[10]=a*c}else if(e.order==="YZX"){const m=a*c,g=a*u,y=o*c,b=o*u;n[0]=c*f,n[4]=b-m*p,n[8]=y*p+g,n[1]=p,n[5]=a*f,n[9]=-o*f,n[2]=-u*f,n[6]=g*p+y,n[10]=m-b*p}else if(e.order==="XZY"){const m=a*c,g=a*u,y=o*c,b=o*u;n[0]=c*f,n[4]=-p,n[8]=u*f,n[1]=m*p+b,n[5]=a*f,n[9]=g*p-y,n[2]=y*p-g,n[6]=o*f,n[10]=b*p+m}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(HX,e,WX)}lookAt(e,n,i){const r=this.elements;return fr.subVectors(e,n),fr.lengthSq()===0&&(fr.z=1),fr.normalize(),eo.crossVectors(i,fr),eo.lengthSq()===0&&(Math.abs(i.z)===1?fr.x+=1e-4:fr.z+=1e-4,fr.normalize(),eo.crossVectors(i,fr)),eo.normalize(),Hm.crossVectors(fr,eo),r[0]=eo.x,r[4]=Hm.x,r[8]=fr.x,r[1]=eo.y,r[5]=Hm.y,r[9]=fr.y,r[2]=eo.z,r[6]=Hm.z,r[10]=fr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,r=n.elements,s=this.elements,a=i[0],o=i[4],c=i[8],u=i[12],f=i[1],p=i[5],m=i[9],g=i[13],y=i[2],b=i[6],w=i[10],x=i[14],_=i[3],S=i[7],M=i[11],E=i[15],C=r[0],N=r[4],D=r[8],R=r[12],k=r[1],V=r[5],G=r[9],ie=r[13],z=r[2],$=r[6],X=r[10],ee=r[14],L=r[3],j=r[7],B=r[11],Y=r[15];return s[0]=a*C+o*k+c*z+u*L,s[4]=a*N+o*V+c*$+u*j,s[8]=a*D+o*G+c*X+u*B,s[12]=a*R+o*ie+c*ee+u*Y,s[1]=f*C+p*k+m*z+g*L,s[5]=f*N+p*V+m*$+g*j,s[9]=f*D+p*G+m*X+g*B,s[13]=f*R+p*ie+m*ee+g*Y,s[2]=y*C+b*k+w*z+x*L,s[6]=y*N+b*V+w*$+x*j,s[10]=y*D+b*G+w*X+x*B,s[14]=y*R+b*ie+w*ee+x*Y,s[3]=_*C+S*k+M*z+E*L,s[7]=_*N+S*V+M*$+E*j,s[11]=_*D+S*G+M*X+E*B,s[15]=_*R+S*ie+M*ee+E*Y,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],r=e[8],s=e[12],a=e[1],o=e[5],c=e[9],u=e[13],f=e[2],p=e[6],m=e[10],g=e[14],y=e[3],b=e[7],w=e[11],x=e[15];return y*(+s*c*p-r*u*p-s*o*m+i*u*m+r*o*g-i*c*g)+b*(+n*c*g-n*u*m+s*a*m-r*a*g+r*u*f-s*c*f)+w*(+n*u*p-n*o*g-s*a*p+i*a*g+s*o*f-i*u*f)+x*(-r*o*f-n*c*p+n*o*m+r*a*p-i*a*m+i*c*f)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=n,r[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],c=e[6],u=e[7],f=e[8],p=e[9],m=e[10],g=e[11],y=e[12],b=e[13],w=e[14],x=e[15],_=p*w*u-b*m*u+b*c*g-o*w*g-p*c*x+o*m*x,S=y*m*u-f*w*u-y*c*g+a*w*g+f*c*x-a*m*x,M=f*b*u-y*p*u+y*o*g-a*b*g-f*o*x+a*p*x,E=y*p*c-f*b*c-y*o*m+a*b*m+f*o*w-a*p*w,C=n*_+i*S+r*M+s*E;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const N=1/C;return e[0]=_*N,e[1]=(b*m*s-p*w*s-b*r*g+i*w*g+p*r*x-i*m*x)*N,e[2]=(o*w*s-b*c*s+b*r*u-i*w*u-o*r*x+i*c*x)*N,e[3]=(p*c*s-o*m*s-p*r*u+i*m*u+o*r*g-i*c*g)*N,e[4]=S*N,e[5]=(f*w*s-y*m*s+y*r*g-n*w*g-f*r*x+n*m*x)*N,e[6]=(y*c*s-a*w*s-y*r*u+n*w*u+a*r*x-n*c*x)*N,e[7]=(a*m*s-f*c*s+f*r*u-n*m*u-a*r*g+n*c*g)*N,e[8]=M*N,e[9]=(y*p*s-f*b*s-y*i*g+n*b*g+f*i*x-n*p*x)*N,e[10]=(a*b*s-y*o*s+y*i*u-n*b*u-a*i*x+n*o*x)*N,e[11]=(f*o*s-a*p*s-f*i*u+n*p*u+a*i*g-n*o*g)*N,e[12]=E*N,e[13]=(f*b*r-y*p*r+y*i*m-n*b*m-f*i*w+n*p*w)*N,e[14]=(y*o*r-a*b*r-y*i*c+n*b*c+a*i*w-n*o*w)*N,e[15]=(a*p*r-f*o*r+f*i*c-n*p*c-a*i*m+n*o*m)*N,this}scale(e){const n=this.elements,i=e.x,r=e.y,s=e.z;return n[0]*=i,n[4]*=r,n[8]*=s,n[1]*=i,n[5]*=r,n[9]*=s,n[2]*=i,n[6]*=r,n[10]*=s,n[3]*=i,n[7]*=r,n[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,r))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),r=Math.sin(n),s=1-i,a=e.x,o=e.y,c=e.z,u=s*a,f=s*o;return this.set(u*a+i,u*o-r*c,u*c+r*o,0,u*o+r*c,f*o+i,f*c-r*a,0,u*c-r*o,f*c+r*a,s*c*c+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,r,s,a){return this.set(1,i,s,0,e,1,a,0,n,r,1,0,0,0,0,1),this}compose(e,n,i){const r=this.elements,s=n._x,a=n._y,o=n._z,c=n._w,u=s+s,f=a+a,p=o+o,m=s*u,g=s*f,y=s*p,b=a*f,w=a*p,x=o*p,_=c*u,S=c*f,M=c*p,E=i.x,C=i.y,N=i.z;return r[0]=(1-(b+x))*E,r[1]=(g+M)*E,r[2]=(y-S)*E,r[3]=0,r[4]=(g-M)*C,r[5]=(1-(m+x))*C,r[6]=(w+_)*C,r[7]=0,r[8]=(y+S)*N,r[9]=(w-_)*N,r[10]=(1-(m+b))*N,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,n,i){const r=this.elements;let s=Fc.set(r[0],r[1],r[2]).length();const a=Fc.set(r[4],r[5],r[6]).length(),o=Fc.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],es.copy(this);const u=1/s,f=1/a,p=1/o;return es.elements[0]*=u,es.elements[1]*=u,es.elements[2]*=u,es.elements[4]*=f,es.elements[5]*=f,es.elements[6]*=f,es.elements[8]*=p,es.elements[9]*=p,es.elements[10]*=p,n.setFromRotationMatrix(es),i.x=s,i.y=a,i.z=o,this}makePerspective(e,n,i,r,s,a,o=hs){const c=this.elements,u=2*s/(n-e),f=2*s/(i-r),p=(n+e)/(n-e),m=(i+r)/(i-r);let g,y;if(o===hs)g=-(a+s)/(a-s),y=-2*a*s/(a-s);else if(o===nd)g=-a/(a-s),y=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return c[0]=u,c[4]=0,c[8]=p,c[12]=0,c[1]=0,c[5]=f,c[9]=m,c[13]=0,c[2]=0,c[6]=0,c[10]=g,c[14]=y,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,n,i,r,s,a,o=hs){const c=this.elements,u=1/(n-e),f=1/(i-r),p=1/(a-s),m=(n+e)*u,g=(i+r)*f;let y,b;if(o===hs)y=(a+s)*p,b=-2*p;else if(o===nd)y=s*p,b=-1*p;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return c[0]=2*u,c[4]=0,c[8]=0,c[12]=-m,c[1]=0,c[5]=2*f,c[9]=0,c[13]=-g,c[2]=0,c[6]=0,c[10]=b,c[14]=-y,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let r=0;r<16;r++)if(n[r]!==i[r])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const Fc=new H,es=new pt,HX=new H(0,0,0),WX=new H(1,1,1),eo=new H,Hm=new H,fr=new H,wP=new pt,bP=new ar;class rp{constructor(e=0,n=0,i=0,r=rp.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,r=this._order){return this._x=e,this._y=n,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const r=e.elements,s=r[0],a=r[4],o=r[8],c=r[1],u=r[5],f=r[9],p=r[2],m=r[6],g=r[10];switch(n){case"XYZ":this._y=Math.asin(Pn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-f,g),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(m,u),this._z=0);break;case"YXZ":this._x=Math.asin(-Pn(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(o,g),this._z=Math.atan2(c,u)):(this._y=Math.atan2(-p,s),this._z=0);break;case"ZXY":this._x=Math.asin(Pn(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(-p,g),this._z=Math.atan2(-a,u)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-Pn(p,-1,1)),Math.abs(p)<.9999999?(this._x=Math.atan2(m,g),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-a,u));break;case"YZX":this._z=Math.asin(Pn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-f,u),this._y=Math.atan2(-p,s)):(this._x=0,this._y=Math.atan2(o,g));break;case"XZY":this._z=Math.asin(-Pn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(m,u),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-f,g),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return wP.makeRotationFromQuaternion(e),this.setFromRotationMatrix(wP,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return bP.setFromEuler(this),this.setFromQuaternion(bP,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}rp.DEFAULT_ORDER="XYZ";class ql{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let GX=0;const _P=new H,jc=new ar,la=new pt,Wm=new H,nh=new H,qX=new H,XX=new ar,SP=new H(1,0,0),AP=new H(0,1,0),MP=new H(0,0,1),$X={type:"added"},YX={type:"removed"};class Gt extends Oa{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:GX++}),this.uuid=_r(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Gt.DEFAULT_UP.clone();const e=new H,n=new rp,i=new ar,r=new H(1,1,1);function s(){i.setFromEuler(n,!1)}function a(){n.setFromQuaternion(i,void 0,!1)}n._onChange(s),i._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new pt},normalMatrix:{value:new Pt}}),this.matrix=new pt,this.matrixWorld=new pt,this.matrixAutoUpdate=Gt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Gt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new ql,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return jc.setFromAxisAngle(e,n),this.quaternion.multiply(jc),this}rotateOnWorldAxis(e,n){return jc.setFromAxisAngle(e,n),this.quaternion.premultiply(jc),this}rotateX(e){return this.rotateOnAxis(SP,e)}rotateY(e){return this.rotateOnAxis(AP,e)}rotateZ(e){return this.rotateOnAxis(MP,e)}translateOnAxis(e,n){return _P.copy(e).applyQuaternion(this.quaternion),this.position.add(_P.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(SP,e)}translateY(e){return this.translateOnAxis(AP,e)}translateZ(e){return this.translateOnAxis(MP,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(la.copy(this.matrixWorld).invert())}lookAt(e,n,i){e.isVector3?Wm.copy(e):Wm.set(e,n,i);const r=this.parent;this.updateWorldMatrix(!0,!1),nh.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?la.lookAt(nh,Wm,this.up):la.lookAt(Wm,nh,this.up),this.quaternion.setFromRotationMatrix(la),r&&(la.extractRotation(r.matrixWorld),jc.setFromRotationMatrix(la),this.quaternion.premultiply(jc.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent($X)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(YX)),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),la.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),la.multiply(e.parent.matrixWorld)),e.applyMatrix4(la),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let i=0,r=this.children.length;i<r;i++){const a=this.children[i].getObjectByProperty(e,n);if(a!==void 0)return a}}getObjectsByProperty(e,n,i=[]){this[e]===n&&i.push(this);const r=this.children;for(let s=0,a=r.length;s<a;s++)r[s].getObjectsByProperty(e,n,i);return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nh,e,qX),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(nh,XX,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const n=this.children;for(let i=0,r=n.length;i<r;i++)n[i].traverseVisible(e)}traverseAncestors(e){const n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const n=this.children;for(let i=0,r=n.length;i<r;i++){const s=n[i];(s.matrixWorldAutoUpdate===!0||e===!0)&&s.updateMatrixWorld(e)}}updateWorldMatrix(e,n){const i=this.parent;if(e===!0&&i!==null&&i.matrixWorldAutoUpdate===!0&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),n===!0){const r=this.children;for(let s=0,a=r.length;s<a;s++){const o=r[s];o.matrixWorldAutoUpdate===!0&&o.updateWorldMatrix(!1,!0)}}}toJSON(e){const n=e===void 0||typeof e=="string",i={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};r.uuid=this.uuid,r.type=this.type,this.name!==""&&(r.name=this.name),this.castShadow===!0&&(r.castShadow=!0),this.receiveShadow===!0&&(r.receiveShadow=!0),this.visible===!1&&(r.visible=!1),this.frustumCulled===!1&&(r.frustumCulled=!1),this.renderOrder!==0&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(o=>({boxInitialized:o.boxInitialized,boxMin:o.box.min.toArray(),boxMax:o.box.max.toArray(),sphereInitialized:o.sphereInitialized,sphereRadius:o.sphere.radius,sphereCenter:o.sphere.center.toArray()})),r.maxGeometryCount=this._maxGeometryCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const c=o.shapes;if(Array.isArray(c))for(let u=0,f=c.length;u<f;u++){const p=c[u];s(e.shapes,p)}else s(e.shapes,c)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(s(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let c=0,u=this.material.length;c<u;c++)o.push(s(e.materials,this.material[c]));r.material=o}else r.material=s(e.materials,this.material);if(this.children.length>0){r.children=[];for(let o=0;o<this.children.length;o++)r.children.push(this.children[o].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let o=0;o<this.animations.length;o++){const c=this.animations[o];r.animations.push(s(e.animations,c))}}if(n){const o=a(e.geometries),c=a(e.materials),u=a(e.textures),f=a(e.images),p=a(e.shapes),m=a(e.skeletons),g=a(e.animations),y=a(e.nodes);o.length>0&&(i.geometries=o),c.length>0&&(i.materials=c),u.length>0&&(i.textures=u),f.length>0&&(i.images=f),p.length>0&&(i.shapes=p),m.length>0&&(i.skeletons=m),g.length>0&&(i.animations=g),y.length>0&&(i.nodes=y)}return i.object=r,i;function a(o){const c=[];for(const u in o){const f=o[u];delete f.metadata,c.push(f)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i<e.children.length;i++){const r=e.children[i];this.add(r.clone())}return this}}Gt.DEFAULT_UP=new H(0,1,0);Gt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Gt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const ts=new H,ca=new H,Sw=new H,ua=new H,Oc=new H,Uc=new H,TP=new H,Aw=new H,Mw=new H,Tw=new H;let Gm=!1;class er{constructor(e=new H,n=new H,i=new H){this.a=e,this.b=n,this.c=i}static getNormal(e,n,i,r){r.subVectors(i,n),ts.subVectors(e,n),r.cross(ts);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,n,i,r,s){ts.subVectors(r,n),ca.subVectors(i,n),Sw.subVectors(e,n);const a=ts.dot(ts),o=ts.dot(ca),c=ts.dot(Sw),u=ca.dot(ca),f=ca.dot(Sw),p=a*u-o*o;if(p===0)return s.set(0,0,0),null;const m=1/p,g=(u*c-o*f)*m,y=(a*f-o*c)*m;return s.set(1-g-y,y,g)}static containsPoint(e,n,i,r){return this.getBarycoord(e,n,i,r,ua)===null?!1:ua.x>=0&&ua.y>=0&&ua.x+ua.y<=1}static getUV(e,n,i,r,s,a,o,c){return Gm===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Gm=!0),this.getInterpolation(e,n,i,r,s,a,o,c)}static getInterpolation(e,n,i,r,s,a,o,c){return this.getBarycoord(e,n,i,r,ua)===null?(c.x=0,c.y=0,"z"in c&&(c.z=0),"w"in c&&(c.w=0),null):(c.setScalar(0),c.addScaledVector(s,ua.x),c.addScaledVector(a,ua.y),c.addScaledVector(o,ua.z),c)}static isFrontFacing(e,n,i,r){return ts.subVectors(i,n),ca.subVectors(e,n),ts.cross(ca).dot(r)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,r){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,n,i,r){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ts.subVectors(this.c,this.b),ca.subVectors(this.a,this.b),ts.cross(ca).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return er.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return er.getBarycoord(e,this.a,this.b,this.c,n)}getUV(e,n,i,r,s){return Gm===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Gm=!0),er.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}getInterpolation(e,n,i,r,s){return er.getInterpolation(e,this.a,this.b,this.c,n,i,r,s)}containsPoint(e){return er.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return er.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,r=this.b,s=this.c;let a,o;Oc.subVectors(r,i),Uc.subVectors(s,i),Aw.subVectors(e,i);const c=Oc.dot(Aw),u=Uc.dot(Aw);if(c<=0&&u<=0)return n.copy(i);Mw.subVectors(e,r);const f=Oc.dot(Mw),p=Uc.dot(Mw);if(f>=0&&p<=f)return n.copy(r);const m=c*p-f*u;if(m<=0&&c>=0&&f<=0)return a=c/(c-f),n.copy(i).addScaledVector(Oc,a);Tw.subVectors(e,s);const g=Oc.dot(Tw),y=Uc.dot(Tw);if(y>=0&&g<=y)return n.copy(s);const b=g*u-c*y;if(b<=0&&u>=0&&y<=0)return o=u/(u-y),n.copy(i).addScaledVector(Uc,o);const w=f*y-g*p;if(w<=0&&p-f>=0&&g-y>=0)return TP.subVectors(s,r),o=(p-f)/(p-f+(g-y)),n.copy(r).addScaledVector(TP,o);const x=1/(w+b+m);return a=b*x,o=m*x,n.copy(i).addScaledVector(Oc,a).addScaledVector(Uc,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const rj={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},to={h:0,s:0,l:0},qm={h:0,s:0,l:0};function Ew(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Ue{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=qn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,$t.toWorkingColorSpace(this,n),this}setRGB(e,n,i,r=$t.workingColorSpace){return this.r=e,this.g=n,this.b=i,$t.toWorkingColorSpace(this,r),this}setHSL(e,n,i,r=$t.workingColorSpace){if(e=zA(e,1),n=Pn(n,0,1),i=Pn(i,0,1),n===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+n):i+n-i*n,a=2*i-s;this.r=Ew(a,s,e+1/3),this.g=Ew(a,s,e),this.b=Ew(a,s,e-1/3)}return $t.toWorkingColorSpace(this,r),this}setStyle(e,n=qn){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=r[1],o=r[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,n);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,n);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,n);if(a===6)return this.setHex(parseInt(s,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=qn){const i=rj[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Lu(e.r),this.g=Lu(e.g),this.b=Lu(e.b),this}copyLinearToSRGB(e){return this.r=mw(e.r),this.g=mw(e.g),this.b=mw(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=qn){return $t.fromWorkingColorSpace(Si.copy(this),e),Math.round(Pn(Si.r*255,0,255))*65536+Math.round(Pn(Si.g*255,0,255))*256+Math.round(Pn(Si.b*255,0,255))}getHexString(e=qn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=$t.workingColorSpace){$t.fromWorkingColorSpace(Si.copy(this),n);const i=Si.r,r=Si.g,s=Si.b,a=Math.max(i,r,s),o=Math.min(i,r,s);let c,u;const f=(o+a)/2;if(o===a)c=0,u=0;else{const p=a-o;switch(u=f<=.5?p/(a+o):p/(2-a-o),a){case i:c=(r-s)/p+(r<s?6:0);break;case r:c=(s-i)/p+2;break;case s:c=(i-r)/p+4;break}c/=6}return e.h=c,e.s=u,e.l=f,e}getRGB(e,n=$t.workingColorSpace){return $t.fromWorkingColorSpace(Si.copy(this),n),e.r=Si.r,e.g=Si.g,e.b=Si.b,e}getStyle(e=qn){$t.fromWorkingColorSpace(Si.copy(this),e);const n=Si.r,i=Si.g,r=Si.b;return e!==qn?`color(${e} ${n.toFixed(3)} ${i.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(n*255)},${Math.round(i*255)},${Math.round(r*255)})`}offsetHSL(e,n,i){return this.getHSL(to),this.setHSL(to.h+e,to.s+n,to.l+i)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,n){return this.r=e.r+n.r,this.g=e.g+n.g,this.b=e.b+n.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,n){return this.r+=(e.r-this.r)*n,this.g+=(e.g-this.g)*n,this.b+=(e.b-this.b)*n,this}lerpColors(e,n,i){return this.r=e.r+(n.r-e.r)*i,this.g=e.g+(n.g-e.g)*i,this.b=e.b+(n.b-e.b)*i,this}lerpHSL(e,n){this.getHSL(to),e.getHSL(qm);const i=jh(to.h,qm.h,n),r=jh(to.s,qm.s,n),s=jh(to.l,qm.l,n);return this.setHSL(i,r,s),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const n=this.r,i=this.g,r=this.b,s=e.elements;return this.r=s[0]*n+s[3]*i+s[6]*r,this.g=s[1]*n+s[4]*i+s[7]*r,this.b=s[2]*n+s[5]*i+s[8]*r,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,n=0){return this.r=e[n],this.g=e[n+1],this.b=e[n+2],this}toArray(e=[],n=0){return e[n]=this.r,e[n+1]=this.g,e[n+2]=this.b,e}fromBufferAttribute(e,n){return this.r=e.getX(n),this.g=e.getY(n),this.b=e.getZ(n),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Si=new Ue;Ue.NAMES=rj;let QX=0;class Ii extends Oa{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:QX++}),this.uuid=_r(),this.name="",this.type="Material",this.blending=Wl,this.side=ka,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Vx,this.blendDst=Hx,this.blendEquation=ho,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Ue(0,0,0),this.blendAlpha=0,this.depthFunc=yf,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=m_,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Sl,this.stencilZFail=Sl,this.stencilZPass=Sl,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const r=this[n];if(r===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Wl&&(i.blending=this.blending),this.side!==ka&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Vx&&(i.blendSrc=this.blendSrc),this.blendDst!==Hx&&(i.blendDst=this.blendDst),this.blendEquation!==ho&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==yf&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==m_&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Sl&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Sl&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Sl&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const a=[];for(const o in s){const c=s[o];delete c.metadata,a.push(c)}return a}if(n){const s=r(e.textures),a=r(e.images);s.length>0&&(i.textures=s),a.length>0&&(i.images=a)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const r=n.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=n[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Qo extends Ii{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ue(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=np,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const xa=KX();function KX(){const t=new ArrayBuffer(4),e=new Float32Array(t),n=new Uint32Array(t),i=new Uint32Array(512),r=new Uint32Array(512);for(let c=0;c<256;++c){const u=c-127;u<-27?(i[c]=0,i[c|256]=32768,r[c]=24,r[c|256]=24):u<-14?(i[c]=1024>>-u-14,i[c|256]=1024>>-u-14|32768,r[c]=-u-1,r[c|256]=-u-1):u<=15?(i[c]=u+15<<10,i[c|256]=u+15<<10|32768,r[c]=13,r[c|256]=13):u<128?(i[c]=31744,i[c|256]=64512,r[c]=24,r[c|256]=24):(i[c]=31744,i[c|256]=64512,r[c]=13,r[c|256]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let c=1;c<1024;++c){let u=c<<13,f=0;for(;!(u&8388608);)u<<=1,f-=8388608;u&=-8388609,f+=947912704,s[c]=u|f}for(let c=1024;c<2048;++c)s[c]=939524096+(c-1024<<13);for(let c=1;c<31;++c)a[c]=c<<23;a[31]=1199570944,a[32]=2147483648;for(let c=33;c<63;++c)a[c]=2147483648+(c-32<<23);a[63]=3347054592;for(let c=1;c<64;++c)c!==32&&(o[c]=1024);return{floatView:e,uint32View:n,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:a,offsetTable:o}}function Ki(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=Pn(t,-65504,65504),xa.floatView[0]=t;const e=xa.uint32View[0],n=e>>23&511;return xa.baseTable[n]+((e&8388607)>>xa.shiftTable[n])}function wh(t){const e=t>>10;return xa.uint32View[0]=xa.mantissaTable[xa.offsetTable[e]+(t&1023)]+xa.exponentTable[e],xa.floatView[0]}const ZX={toHalfFloat:Ki,fromHalfFloat:wh},Vn=new H,Xm=new ye;class qt{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=Pf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=ds,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,i){e*=this.itemSize,i*=n.itemSize;for(let r=0,s=this.itemSize;r<s;r++)this.array[e+r]=n.array[i+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let n=0,i=this.count;n<i;n++)Xm.fromBufferAttribute(this,n),Xm.applyMatrix3(e),this.setXY(n,Xm.x,Xm.y);else if(this.itemSize===3)for(let n=0,i=this.count;n<i;n++)Vn.fromBufferAttribute(this,n),Vn.applyMatrix3(e),this.setXYZ(n,Vn.x,Vn.y,Vn.z);return this}applyMatrix4(e){for(let n=0,i=this.count;n<i;n++)Vn.fromBufferAttribute(this,n),Vn.applyMatrix4(e),this.setXYZ(n,Vn.x,Vn.y,Vn.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Vn.fromBufferAttribute(this,n),Vn.applyNormalMatrix(e),this.setXYZ(n,Vn.x,Vn.y,Vn.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Vn.fromBufferAttribute(this,n),Vn.transformDirection(e),this.setXYZ(n,Vn.x,Vn.y,Vn.z);return this}set(e,n=0){return this.array.set(e,n),this}getComponent(e,n){let i=this.array[e*this.itemSize+n];return this.normalized&&(i=tr(i,this.array)),i}setComponent(e,n,i){return this.normalized&&(i=Et(i,this.array)),this.array[e*this.itemSize+n]=i,this}getX(e){let n=this.array[e*this.itemSize];return this.normalized&&(n=tr(n,this.array)),n}setX(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize]=n,this}getY(e){let n=this.array[e*this.itemSize+1];return this.normalized&&(n=tr(n,this.array)),n}setY(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize+1]=n,this}getZ(e){let n=this.array[e*this.itemSize+2];return this.normalized&&(n=tr(n,this.array)),n}setZ(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize+2]=n,this}getW(e){let n=this.array[e*this.itemSize+3];return this.normalized&&(n=tr(n,this.array)),n}setW(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize+3]=n,this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array)),this.array[e+0]=n,this.array[e+1]=i,this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array),r=Et(r,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array),r=Et(r,this.array),s=Et(s,this.array)),this.array[e+0]=n,this.array[e+1]=i,this.array[e+2]=r,this.array[e+3]=s,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Pf&&(e.usage=this.usage),e}}class JX extends qt{constructor(e,n,i){super(new Int8Array(e),n,i)}}class e$ extends qt{constructor(e,n,i){super(new Uint8Array(e),n,i)}}class t$ extends qt{constructor(e,n,i){super(new Uint8ClampedArray(e),n,i)}}class n$ extends qt{constructor(e,n,i){super(new Int16Array(e),n,i)}}class HA extends qt{constructor(e,n,i){super(new Uint16Array(e),n,i)}}class i$ extends qt{constructor(e,n,i){super(new Int32Array(e),n,i)}}class WA extends qt{constructor(e,n,i){super(new Uint32Array(e),n,i)}}class r$ extends qt{constructor(e,n,i){super(new Uint16Array(e),n,i),this.isFloat16BufferAttribute=!0}getX(e){let n=wh(this.array[e*this.itemSize]);return this.normalized&&(n=tr(n,this.array)),n}setX(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize]=Ki(n),this}getY(e){let n=wh(this.array[e*this.itemSize+1]);return this.normalized&&(n=tr(n,this.array)),n}setY(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize+1]=Ki(n),this}getZ(e){let n=wh(this.array[e*this.itemSize+2]);return this.normalized&&(n=tr(n,this.array)),n}setZ(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize+2]=Ki(n),this}getW(e){let n=wh(this.array[e*this.itemSize+3]);return this.normalized&&(n=tr(n,this.array)),n}setW(e,n){return this.normalized&&(n=Et(n,this.array)),this.array[e*this.itemSize+3]=Ki(n),this}setXY(e,n,i){return e*=this.itemSize,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array)),this.array[e+0]=Ki(n),this.array[e+1]=Ki(i),this}setXYZ(e,n,i,r){return e*=this.itemSize,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array),r=Et(r,this.array)),this.array[e+0]=Ki(n),this.array[e+1]=Ki(i),this.array[e+2]=Ki(r),this}setXYZW(e,n,i,r,s){return e*=this.itemSize,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array),r=Et(r,this.array),s=Et(s,this.array)),this.array[e+0]=Ki(n),this.array[e+1]=Ki(i),this.array[e+2]=Ki(r),this.array[e+3]=Ki(s),this}}class Ye extends qt{constructor(e,n,i){super(new Float32Array(e),n,i)}}class s$ extends qt{constructor(e,n,i){super(new Float64Array(e),n,i)}}let a$=0;const Ur=new pt,Cw=new Gt,zc=new H,pr=new Hi,ih=new Hi,ii=new H;class At extends Oa{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:a$++}),this.uuid=_r(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(tj(e)?WA:HA)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,n){return this.attributes[e]=n,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,n,i=0){this.groups.push({start:e,count:n,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(e,n){this.drawRange.start=e,this.drawRange.count=n}applyMatrix4(e){const n=this.attributes.position;n!==void 0&&(n.applyMatrix4(e),n.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const s=new Pt().getNormalMatrix(e);i.applyNormalMatrix(s),i.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ur.makeRotationFromQuaternion(e),this.applyMatrix4(Ur),this}rotateX(e){return Ur.makeRotationX(e),this.applyMatrix4(Ur),this}rotateY(e){return Ur.makeRotationY(e),this.applyMatrix4(Ur),this}rotateZ(e){return Ur.makeRotationZ(e),this.applyMatrix4(Ur),this}translate(e,n,i){return Ur.makeTranslation(e,n,i),this.applyMatrix4(Ur),this}scale(e,n,i){return Ur.makeScale(e,n,i),this.applyMatrix4(Ur),this}lookAt(e){return Cw.lookAt(e),Cw.updateMatrix(),this.applyMatrix4(Cw.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(zc).negate(),this.translate(zc.x,zc.y,zc.z),this}setFromPoints(e){const n=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];n.push(s.x,s.y,s.z||0)}return this.setAttribute("position",new Ye(n,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Hi);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new H(-1/0,-1/0,-1/0),new H(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let i=0,r=n.length;i<r;i++){const s=n[i];pr.setFromBufferAttribute(s),this.morphTargetsRelative?(ii.addVectors(this.boundingBox.min,pr.min),this.boundingBox.expandByPoint(ii),ii.addVectors(this.boundingBox.max,pr.max),this.boundingBox.expandByPoint(ii)):(this.boundingBox.expandByPoint(pr.min),this.boundingBox.expandByPoint(pr.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ni);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new H,1/0);return}if(e){const i=this.boundingSphere.center;if(pr.setFromBufferAttribute(e),n)for(let s=0,a=n.length;s<a;s++){const o=n[s];ih.setFromBufferAttribute(o),this.morphTargetsRelative?(ii.addVectors(pr.min,ih.min),pr.expandByPoint(ii),ii.addVectors(pr.max,ih.max),pr.expandByPoint(ii)):(pr.expandByPoint(ih.min),pr.expandByPoint(ih.max))}pr.getCenter(i);let r=0;for(let s=0,a=e.count;s<a;s++)ii.fromBufferAttribute(e,s),r=Math.max(r,i.distanceToSquared(ii));if(n)for(let s=0,a=n.length;s<a;s++){const o=n[s],c=this.morphTargetsRelative;for(let u=0,f=o.count;u<f;u++)ii.fromBufferAttribute(o,u),c&&(zc.fromBufferAttribute(e,u),ii.add(zc)),r=Math.max(r,i.distanceToSquared(ii))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,n=this.attributes;if(e===null||n.position===void 0||n.normal===void 0||n.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.array,r=n.position.array,s=n.normal.array,a=n.uv.array,o=r.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new qt(new Float32Array(4*o),4));const c=this.getAttribute("tangent").array,u=[],f=[];for(let k=0;k<o;k++)u[k]=new H,f[k]=new H;const p=new H,m=new H,g=new H,y=new ye,b=new ye,w=new ye,x=new H,_=new H;function S(k,V,G){p.fromArray(r,k*3),m.fromArray(r,V*3),g.fromArray(r,G*3),y.fromArray(a,k*2),b.fromArray(a,V*2),w.fromArray(a,G*2),m.sub(p),g.sub(p),b.sub(y),w.sub(y);const ie=1/(b.x*w.y-w.x*b.y);isFinite(ie)&&(x.copy(m).multiplyScalar(w.y).addScaledVector(g,-b.y).multiplyScalar(ie),_.copy(g).multiplyScalar(b.x).addScaledVector(m,-w.x).multiplyScalar(ie),u[k].add(x),u[V].add(x),u[G].add(x),f[k].add(_),f[V].add(_),f[G].add(_))}let M=this.groups;M.length===0&&(M=[{start:0,count:i.length}]);for(let k=0,V=M.length;k<V;++k){const G=M[k],ie=G.start,z=G.count;for(let $=ie,X=ie+z;$<X;$+=3)S(i[$+0],i[$+1],i[$+2])}const E=new H,C=new H,N=new H,D=new H;function R(k){N.fromArray(s,k*3),D.copy(N);const V=u[k];E.copy(V),E.sub(N.multiplyScalar(N.dot(V))).normalize(),C.crossVectors(D,V);const ie=C.dot(f[k])<0?-1:1;c[k*4]=E.x,c[k*4+1]=E.y,c[k*4+2]=E.z,c[k*4+3]=ie}for(let k=0,V=M.length;k<V;++k){const G=M[k],ie=G.start,z=G.count;for(let $=ie,X=ie+z;$<X;$+=3)R(i[$+0]),R(i[$+1]),R(i[$+2])}}computeVertexNormals(){const e=this.index,n=this.getAttribute("position");if(n!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new qt(new Float32Array(n.count*3),3),this.setAttribute("normal",i);else for(let m=0,g=i.count;m<g;m++)i.setXYZ(m,0,0,0);const r=new H,s=new H,a=new H,o=new H,c=new H,u=new H,f=new H,p=new H;if(e)for(let m=0,g=e.count;m<g;m+=3){const y=e.getX(m+0),b=e.getX(m+1),w=e.getX(m+2);r.fromBufferAttribute(n,y),s.fromBufferAttribute(n,b),a.fromBufferAttribute(n,w),f.subVectors(a,s),p.subVectors(r,s),f.cross(p),o.fromBufferAttribute(i,y),c.fromBufferAttribute(i,b),u.fromBufferAttribute(i,w),o.add(f),c.add(f),u.add(f),i.setXYZ(y,o.x,o.y,o.z),i.setXYZ(b,c.x,c.y,c.z),i.setXYZ(w,u.x,u.y,u.z)}else for(let m=0,g=n.count;m<g;m+=3)r.fromBufferAttribute(n,m+0),s.fromBufferAttribute(n,m+1),a.fromBufferAttribute(n,m+2),f.subVectors(a,s),p.subVectors(r,s),f.cross(p),i.setXYZ(m+0,f.x,f.y,f.z),i.setXYZ(m+1,f.x,f.y,f.z),i.setXYZ(m+2,f.x,f.y,f.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let n=0,i=e.count;n<i;n++)ii.fromBufferAttribute(e,n),ii.normalize(),e.setXYZ(n,ii.x,ii.y,ii.z)}toNonIndexed(){function e(o,c){const u=o.array,f=o.itemSize,p=o.normalized,m=new u.constructor(c.length*f);let g=0,y=0;for(let b=0,w=c.length;b<w;b++){o.isInterleavedBufferAttribute?g=c[b]*o.data.stride+o.offset:g=c[b]*f;for(let x=0;x<f;x++)m[y++]=u[g++]}return new qt(m,f,p)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const n=new At,i=this.index.array,r=this.attributes;for(const o in r){const c=r[o],u=e(c,i);n.setAttribute(o,u)}const s=this.morphAttributes;for(const o in s){const c=[],u=s[o];for(let f=0,p=u.length;f<p;f++){const m=u[f],g=e(m,i);c.push(g)}n.morphAttributes[o]=c}n.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let o=0,c=a.length;o<c;o++){const u=a[o];n.addGroup(u.start,u.count,u.materialIndex)}return n}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const u in c)c[u]!==void 0&&(e[u]=c[u]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const c in i){const u=i[c];e.data.attributes[c]=u.toJSON(e.data)}const r={};let s=!1;for(const c in this.morphAttributes){const u=this.morphAttributes[c],f=[];for(let p=0,m=u.length;p<m;p++){const g=u[p];f.push(g.toJSON(e.data))}f.length>0&&(r[c]=f,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const r=e.attributes;for(const u in r){const f=r[u];this.setAttribute(u,f.clone(n))}const s=e.morphAttributes;for(const u in s){const f=[],p=s[u];for(let m=0,g=p.length;m<g;m++)f.push(p[m].clone(n));this.morphAttributes[u]=f}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let u=0,f=a.length;u<f;u++){const p=a[u];this.addGroup(p.start,p.count,p.materialIndex)}const o=e.boundingBox;o!==null&&(this.boundingBox=o.clone());const c=e.boundingSphere;return c!==null&&(this.boundingSphere=c.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const EP=new pt,dl=new vd,$m=new Ni,CP=new H,Bc=new H,Vc=new H,Hc=new H,Pw=new H,Ym=new H,Qm=new ye,Km=new ye,Zm=new ye,PP=new H,NP=new H,RP=new H,Jm=new H,eg=new H;class $n extends Gt{constructor(e=new At,n=new Qo){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=r.length;s<a;s++){const o=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}getVertexPosition(e,n){const i=this.geometry,r=i.attributes.position,s=i.morphAttributes.position,a=i.morphTargetsRelative;n.fromBufferAttribute(r,e);const o=this.morphTargetInfluences;if(s&&o){Ym.set(0,0,0);for(let c=0,u=s.length;c<u;c++){const f=o[c],p=s[c];f!==0&&(Pw.fromBufferAttribute(p,e),a?Ym.addScaledVector(Pw,f):Ym.addScaledVector(Pw.sub(n),f))}n.add(Ym)}return n}raycast(e,n){const i=this.geometry,r=this.material,s=this.matrixWorld;r!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),$m.copy(i.boundingSphere),$m.applyMatrix4(s),dl.copy(e.ray).recast(e.near),!($m.containsPoint(dl.origin)===!1&&(dl.intersectSphere($m,CP)===null||dl.origin.distanceToSquared(CP)>(e.far-e.near)**2))&&(EP.copy(s).invert(),dl.copy(e.ray).applyMatrix4(EP),!(i.boundingBox!==null&&dl.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,dl)))}_computeIntersections(e,n,i){let r;const s=this.geometry,a=this.material,o=s.index,c=s.attributes.position,u=s.attributes.uv,f=s.attributes.uv1,p=s.attributes.normal,m=s.groups,g=s.drawRange;if(o!==null)if(Array.isArray(a))for(let y=0,b=m.length;y<b;y++){const w=m[y],x=a[w.materialIndex],_=Math.max(w.start,g.start),S=Math.min(o.count,Math.min(w.start+w.count,g.start+g.count));for(let M=_,E=S;M<E;M+=3){const C=o.getX(M),N=o.getX(M+1),D=o.getX(M+2);r=tg(this,x,e,i,u,f,p,C,N,D),r&&(r.faceIndex=Math.floor(M/3),r.face.materialIndex=w.materialIndex,n.push(r))}}else{const y=Math.max(0,g.start),b=Math.min(o.count,g.start+g.count);for(let w=y,x=b;w<x;w+=3){const _=o.getX(w),S=o.getX(w+1),M=o.getX(w+2);r=tg(this,a,e,i,u,f,p,_,S,M),r&&(r.faceIndex=Math.floor(w/3),n.push(r))}}else if(c!==void 0)if(Array.isArray(a))for(let y=0,b=m.length;y<b;y++){const w=m[y],x=a[w.materialIndex],_=Math.max(w.start,g.start),S=Math.min(c.count,Math.min(w.start+w.count,g.start+g.count));for(let M=_,E=S;M<E;M+=3){const C=M,N=M+1,D=M+2;r=tg(this,x,e,i,u,f,p,C,N,D),r&&(r.faceIndex=Math.floor(M/3),r.face.materialIndex=w.materialIndex,n.push(r))}}else{const y=Math.max(0,g.start),b=Math.min(c.count,g.start+g.count);for(let w=y,x=b;w<x;w+=3){const _=w,S=w+1,M=w+2;r=tg(this,a,e,i,u,f,p,_,S,M),r&&(r.faceIndex=Math.floor(w/3),n.push(r))}}}}function o$(t,e,n,i,r,s,a,o){let c;if(e.side===Vi?c=i.intersectTriangle(a,s,r,!0,o):c=i.intersectTriangle(r,s,a,e.side===ka,o),c===null)return null;eg.copy(o),eg.applyMatrix4(t.matrixWorld);const u=n.ray.origin.distanceTo(eg);return u<n.near||u>n.far?null:{distance:u,point:eg.clone(),object:t}}function tg(t,e,n,i,r,s,a,o,c,u){t.getVertexPosition(o,Bc),t.getVertexPosition(c,Vc),t.getVertexPosition(u,Hc);const f=o$(t,e,n,i,Bc,Vc,Hc,Jm);if(f){r&&(Qm.fromBufferAttribute(r,o),Km.fromBufferAttribute(r,c),Zm.fromBufferAttribute(r,u),f.uv=er.getInterpolation(Jm,Bc,Vc,Hc,Qm,Km,Zm,new ye)),s&&(Qm.fromBufferAttribute(s,o),Km.fromBufferAttribute(s,c),Zm.fromBufferAttribute(s,u),f.uv1=er.getInterpolation(Jm,Bc,Vc,Hc,Qm,Km,Zm,new ye),f.uv2=f.uv1),a&&(PP.fromBufferAttribute(a,o),NP.fromBufferAttribute(a,c),RP.fromBufferAttribute(a,u),f.normal=er.getInterpolation(Jm,Bc,Vc,Hc,PP,NP,RP,new H),f.normal.dot(i.direction)>0&&f.normal.multiplyScalar(-1));const p={a:o,b:c,c:u,normal:new H,materialIndex:0};er.getNormal(Bc,Vc,Hc,p.normal),f.face=p}return f}class uc extends At{constructor(e=1,n=1,i=1,r=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:r,heightSegments:s,depthSegments:a};const o=this;r=Math.floor(r),s=Math.floor(s),a=Math.floor(a);const c=[],u=[],f=[],p=[];let m=0,g=0;y("z","y","x",-1,-1,i,n,e,a,s,0),y("z","y","x",1,-1,i,n,-e,a,s,1),y("x","z","y",1,1,e,i,n,r,a,2),y("x","z","y",1,-1,e,i,-n,r,a,3),y("x","y","z",1,-1,e,n,i,r,s,4),y("x","y","z",-1,-1,e,n,-i,r,s,5),this.setIndex(c),this.setAttribute("position",new Ye(u,3)),this.setAttribute("normal",new Ye(f,3)),this.setAttribute("uv",new Ye(p,2));function y(b,w,x,_,S,M,E,C,N,D,R){const k=M/N,V=E/D,G=M/2,ie=E/2,z=C/2,$=N+1,X=D+1;let ee=0,L=0;const j=new H;for(let B=0;B<X;B++){const Y=B*V-ie;for(let Z=0;Z<$;Z++){const K=Z*k-G;j[b]=K*_,j[w]=Y*S,j[x]=z,u.push(j.x,j.y,j.z),j[b]=0,j[w]=0,j[x]=C>0?1:-1,f.push(j.x,j.y,j.z),p.push(Z/N),p.push(1-B/D),ee+=1}}for(let B=0;B<D;B++)for(let Y=0;Y<N;Y++){const Z=m+Y+$*B,K=m+Y+$*(B+1),se=m+(Y+1)+$*(B+1),ge=m+(Y+1)+$*B;c.push(Z,K,ge),c.push(K,se,ge),L+=6}o.addGroup(g,L,R),g+=L,m+=ee}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new uc(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function rd(t){const e={};for(const n in t){e[n]={};for(const i in t[n]){const r=t[n][i];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][i]=null):e[n][i]=r.clone():Array.isArray(r)?e[n][i]=r.slice():e[n][i]=r}}return e}function Fi(t){const e={};for(let n=0;n<t.length;n++){const i=rd(t[n]);for(const r in i)e[r]=i[r]}return e}function l$(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}function sj(t){return t.getRenderTarget()===null?t.outputColorSpace:$t.workingColorSpace}const aj={clone:rd,merge:Fi};var c$=`void main() {
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,u$=`void main() {
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`;class Qs extends Ii{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=c$,this.fragmentShader=u$,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=rd(e.uniforms),this.uniformsGroups=l$(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const n=super.toJSON(e);n.glslVersion=this.glslVersion,n.uniforms={};for(const r in this.uniforms){const a=this.uniforms[r].value;a&&a.isTexture?n.uniforms[r]={type:"t",value:a.toJSON(e).uuid}:a&&a.isColor?n.uniforms[r]={type:"c",value:a.getHex()}:a&&a.isVector2?n.uniforms[r]={type:"v2",value:a.toArray()}:a&&a.isVector3?n.uniforms[r]={type:"v3",value:a.toArray()}:a&&a.isVector4?n.uniforms[r]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?n.uniforms[r]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?n.uniforms[r]={type:"m4",value:a.toArray()}:n.uniforms[r]={value:a}}Object.keys(this.defines).length>0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class sp extends Gt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new pt,this.projectionMatrix=new pt,this.projectionMatrixInverse=new pt,this.coordinateSystem=hs}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class si extends sp{constructor(e=50,n=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=id*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Gl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return id*2*Math.atan(Math.tan(Gl*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,n,i,r,s,a){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(Gl*.5*this.fov)/this.zoom,i=2*n,r=this.aspect*i,s=-.5*r;const a=this.view;if(this.view!==null&&this.view.enabled){const c=a.fullWidth,u=a.fullHeight;s+=a.offsetX*r/c,n-=a.offsetY*i/u,r*=a.width/c,i*=a.height/u}const o=this.filmOffset;o!==0&&(s+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const Wc=-90,Gc=1;class oj extends Gt{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new si(Wc,Gc,e,n);r.layers=this.layers,this.add(r);const s=new si(Wc,Gc,e,n);s.layers=this.layers,this.add(s);const a=new si(Wc,Gc,e,n);a.layers=this.layers,this.add(a);const o=new si(Wc,Gc,e,n);o.layers=this.layers,this.add(o);const c=new si(Wc,Gc,e,n);c.layers=this.layers,this.add(c);const u=new si(Wc,Gc,e,n);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,r,s,a,o,c]=n;for(const u of n)this.remove(u);if(e===hs)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===nd)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of n)this.add(u),u.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,a,o,c,u,f]=this.children,p=e.getRenderTarget(),m=e.getActiveCubeFace(),g=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const b=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(n,s),e.setRenderTarget(i,1,r),e.render(n,a),e.setRenderTarget(i,2,r),e.render(n,o),e.setRenderTarget(i,3,r),e.render(n,c),e.setRenderTarget(i,4,r),e.render(n,u),i.texture.generateMipmaps=b,e.setRenderTarget(i,5,r),e.render(n,f),e.setRenderTarget(p,m,g),e.xr.enabled=y,i.texture.needsPMREMUpdate=!0}}class ap extends Un{constructor(e,n,i,r,s,a,o,c,u,f){e=e!==void 0?e:[],n=n!==void 0?n:La,super(e,n,i,r,s,a,o,c,u,f),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class lj extends ys{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];n.encoding!==void 0&&(Oh("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Io?qn:xr),this.texture=new ap(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:jn}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
varying vec3 vWorldDirection;
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}
`,fragmentShader:`
uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
gl_FragColor = texture2D( tEquirect, sampleUV );
}
`},r=new uc(5,5,5),s=new Qs({name:"CubemapFromEquirect",uniforms:rd(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Vi,blending:Ma});s.uniforms.tEquirect.value=n;const a=new $n(r,s),o=n.minFilter;return n.minFilter===Bo&&(n.minFilter=jn),new oj(1,10,this).update(e,a),n.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,n,i,r){const s=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(n,i,r);e.setRenderTarget(s)}}const Nw=new H,d$=new H,h$=new Pt;class lo{constructor(e=new H(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,r){return this.normal.set(e,n,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const r=Nw.subVectors(i,n).cross(d$.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta(Nw),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:n.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const i=n||h$.getNormalMatrix(e),r=this.coplanarPoint(Nw).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const hl=new Ni,ng=new H;class op{constructor(e=new lo,n=new lo,i=new lo,r=new lo,s=new lo,a=new lo){this.planes=[e,n,i,r,s,a]}set(e,n,i,r,s,a){const o=this.planes;return o[0].copy(e),o[1].copy(n),o[2].copy(i),o[3].copy(r),o[4].copy(s),o[5].copy(a),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=hs){const i=this.planes,r=e.elements,s=r[0],a=r[1],o=r[2],c=r[3],u=r[4],f=r[5],p=r[6],m=r[7],g=r[8],y=r[9],b=r[10],w=r[11],x=r[12],_=r[13],S=r[14],M=r[15];if(i[0].setComponents(c-s,m-u,w-g,M-x).normalize(),i[1].setComponents(c+s,m+u,w+g,M+x).normalize(),i[2].setComponents(c+a,m+f,w+y,M+_).normalize(),i[3].setComponents(c-a,m-f,w-y,M-_).normalize(),i[4].setComponents(c-o,m-p,w-b,M-S).normalize(),n===hs)i[5].setComponents(c+o,m+p,w+b,M+S).normalize();else if(n===nd)i[5].setComponents(o,p,b,S).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),hl.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),hl.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(hl)}intersectsSprite(e){return hl.center.set(0,0,0),hl.radius=.7071067811865476,hl.applyMatrix4(e.matrixWorld),this.intersectsSphere(hl)}intersectsSphere(e){const n=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(n[s].distanceToPoint(i)<r)return!1;return!0}intersectsBox(e){const n=this.planes;for(let i=0;i<6;i++){const r=n[i];if(ng.x=r.normal.x>0?e.max.x:e.min.x,ng.y=r.normal.y>0?e.max.y:e.min.y,ng.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(ng)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function cj(){let t=null,e=!1,n=null,i=null;function r(s,a){n(s,a),i=t.requestAnimationFrame(r)}return{start:function(){e!==!0&&n!==null&&(i=t.requestAnimationFrame(r),e=!0)},stop:function(){t.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){n=s},setContext:function(s){t=s}}}function f$(t,e){const n=e.isWebGL2,i=new WeakMap;function r(u,f){const p=u.array,m=u.usage,g=p.byteLength,y=t.createBuffer();t.bindBuffer(f,y),t.bufferData(f,p,m),u.onUploadCallback();let b;if(p instanceof Float32Array)b=t.FLOAT;else if(p instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(n)b=t.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else b=t.UNSIGNED_SHORT;else if(p instanceof Int16Array)b=t.SHORT;else if(p instanceof Uint32Array)b=t.UNSIGNED_INT;else if(p instanceof Int32Array)b=t.INT;else if(p instanceof Int8Array)b=t.BYTE;else if(p instanceof Uint8Array)b=t.UNSIGNED_BYTE;else if(p instanceof Uint8ClampedArray)b=t.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+p);return{buffer:y,type:b,bytesPerElement:p.BYTES_PER_ELEMENT,version:u.version,size:g}}function s(u,f,p){const m=f.array,g=f._updateRange,y=f.updateRanges;if(t.bindBuffer(p,u),g.count===-1&&y.length===0&&t.bufferSubData(p,0,m),y.length!==0){for(let b=0,w=y.length;b<w;b++){const x=y[b];n?t.bufferSubData(p,x.start*m.BYTES_PER_ELEMENT,m,x.start,x.count):t.bufferSubData(p,x.start*m.BYTES_PER_ELEMENT,m.subarray(x.start,x.start+x.count))}f.clearUpdateRanges()}g.count!==-1&&(n?t.bufferSubData(p,g.offset*m.BYTES_PER_ELEMENT,m,g.offset,g.count):t.bufferSubData(p,g.offset*m.BYTES_PER_ELEMENT,m.subarray(g.offset,g.offset+g.count)),g.count=-1),f.onUploadCallback()}function a(u){return u.isInterleavedBufferAttribute&&(u=u.data),i.get(u)}function o(u){u.isInterleavedBufferAttribute&&(u=u.data);const f=i.get(u);f&&(t.deleteBuffer(f.buffer),i.delete(u))}function c(u,f){if(u.isGLBufferAttribute){const m=i.get(u);(!m||m.version<u.version)&&i.set(u,{buffer:u.buffer,type:u.type,bytesPerElement:u.elementSize,version:u.version});return}u.isInterleavedBufferAttribute&&(u=u.data);const p=i.get(u);if(p===void 0)i.set(u,r(u,f));else if(p.version<u.version){if(p.size!==u.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");s(p.buffer,u,f),p.version=u.version}}return{get:a,remove:o,update:c}}class lp extends At{constructor(e=1,n=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:n,widthSegments:i,heightSegments:r};const s=e/2,a=n/2,o=Math.floor(i),c=Math.floor(r),u=o+1,f=c+1,p=e/o,m=n/c,g=[],y=[],b=[],w=[];for(let x=0;x<f;x++){const _=x*m-a;for(let S=0;S<u;S++){const M=S*p-s;y.push(M,-_,0),b.push(0,0,1),w.push(S/o),w.push(1-x/c)}}for(let x=0;x<c;x++)for(let _=0;_<o;_++){const S=_+u*x,M=_+u*(x+1),E=_+1+u*(x+1),C=_+1+u*x;g.push(S,M,C),g.push(M,E,C)}this.setIndex(g),this.setAttribute("position",new Ye(y,3)),this.setAttribute("normal",new Ye(b,3)),this.setAttribute("uv",new Ye(w,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new lp(e.width,e.height,e.widthSegments,e.heightSegments)}}var p$=`#ifdef USE_ALPHAHASH
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
#endif`,m$=`#ifdef USE_ALPHAHASH
const float ALPHA_HASH_SCALE = 0.05;
float hash2D( vec2 value ) {
return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
}
float hash3D( vec3 value ) {
return hash2D( vec2( hash2D( value.xy ), value.z ) );
}
float getAlphaHashThreshold( vec3 position ) {
float maxDeriv = max(
length( dFdx( position.xyz ) ),
length( dFdy( position.xyz ) )
);
float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
vec2 pixScales = vec2(
exp2( floor( log2( pixScale ) ) ),
exp2( ceil( log2( pixScale ) ) )
);
vec2 alpha = vec2(
hash3D( floor( pixScales.x * position.xyz ) ),
hash3D( floor( pixScales.y * position.xyz ) )
);
float lerpFactor = fract( log2( pixScale ) );
float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
float a = min( lerpFactor, 1.0 - lerpFactor );
vec3 cases = vec3(
x * x / ( 2.0 * a * ( 1.0 - a ) ),
( x - 0.5 * a ) / ( 1.0 - a ),
1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
);
float threshold = ( x < ( 1.0 - a ) )
? ( ( x < a ) ? cases.x : cases.y )
: cases.z;
return clamp( threshold , 1.0e-6, 1.0 );
}
#endif`,g$=`#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
#endif`,x$=`#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,y$=`#ifdef USE_ALPHATEST
if ( diffuseColor.a < alphaTest ) discard;
#endif`,v$=`#ifdef USE_ALPHATEST
uniform float alphaTest;
#endif`,w$=`#ifdef USE_AOMAP
float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
reflectedLight.indirectDiffuse *= ambientOcclusion;
#if defined( USE_CLEARCOAT )
clearcoatSpecularIndirect *= ambientOcclusion;
#endif
#if defined( USE_SHEEN )
sheenSpecularIndirect *= ambientOcclusion;
#endif
#if defined( USE_ENVMAP ) && defined( STANDARD )
float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
#endif
#endif`,b$=`#ifdef USE_AOMAP
uniform sampler2D aoMap;
uniform float aoMapIntensity;
#endif`,_$=`#ifdef USE_BATCHING
attribute float batchId;
uniform highp sampler2D batchingTexture;
mat4 getBatchingMatrix( const in float i ) {
int size = textureSize( batchingTexture, 0 ).x;
int j = int( i ) * 4;
int x = j % size;
int y = j / size;
vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
return mat4( v1, v2, v3, v4 );
}
#endif`,S$=`#ifdef USE_BATCHING
mat4 batchingMatrix = getBatchingMatrix( batchId );
#endif`,A$=`vec3 transformed = vec3( position );
#ifdef USE_ALPHAHASH
vPosition = vec3( position );
#endif`,M$=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
vec3 objectTangent = vec3( tangent.xyz );
#endif`,T$=`float G_BlinnPhong_Implicit( ) {
return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
vec3 halfDir = normalize( lightDir + viewDir );
float dotNH = saturate( dot( normal, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( specularColor, 1.0, dotVH );
float G = G_BlinnPhong_Implicit( );
float D = D_BlinnPhong( shininess, dotNH );
return F * ( G * D );
} // validated`,E$=`#ifdef USE_IRIDESCENCE
const mat3 XYZ_TO_REC709 = mat3(
3.2404542, -0.9692660, 0.0556434,
-1.5371385, 1.8760108, -0.2040259,
-0.4985314, 0.0415560, 1.0572252
);
vec3 Fresnel0ToIor( vec3 fresnel0 ) {
vec3 sqrtF0 = sqrt( fresnel0 );
return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
}
vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
}
float IorToFresnel0( float transmittedIor, float incidentIor ) {
return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
}
vec3 evalSensitivity( float OPD, vec3 shift ) {
float phase = 2.0 * PI * OPD * 1.0e-9;
vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
xyz /= 1.0685e-7;
vec3 rgb = XYZ_TO_REC709 * xyz;
return rgb;
}
vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
vec3 I;
float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
float cosTheta2Sq = 1.0 - sinTheta2Sq;
if ( cosTheta2Sq < 0.0 ) {
return vec3( 1.0 );
}
float cosTheta2 = sqrt( cosTheta2Sq );
float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
float R12 = F_Schlick( R0, 1.0, cosTheta1 );
float T121 = 1.0 - R12;
float phi12 = 0.0;
if ( iridescenceIOR < outsideIOR ) phi12 = PI;
float phi21 = PI - phi12;
vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
vec3 phi23 = vec3( 0.0 );
if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
vec3 phi = vec3( phi21 ) + phi23;
vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
vec3 r123 = sqrt( R123 );
vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
vec3 C0 = R12 + Rs;
I = C0;
vec3 Cm = Rs - T121;
for ( int m = 1; m <= 2; ++ m ) {
Cm *= r123;
vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
I += Cm * Sm;
}
return max( I, vec3( 0.0 ) );
}
#endif`,C$=`#ifdef USE_BUMPMAP
uniform sampler2D bumpMap;
uniform float bumpScale;
vec2 dHdxy_fwd() {
vec2 dSTdx = dFdx( vBumpMapUv );
vec2 dSTdy = dFdy( vBumpMapUv );
float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
return vec2( dBx, dBy );
}
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
vec3 vN = surf_norm;
vec3 R1 = cross( vSigmaY, vN );
vec3 R2 = cross( vN, vSigmaX );
float fDet = dot( vSigmaX, R1 ) * faceDirection;
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
return normalize( abs( fDet ) * surf_norm - vGrad );
}
#endif`,P$=`#if NUM_CLIPPING_PLANES > 0
vec4 plane;
#pragma unroll_loop_start
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
}
#pragma unroll_loop_end
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
bool clipped = true;
#pragma unroll_loop_start
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
plane = clippingPlanes[ i ];
clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
}
#pragma unroll_loop_end
if ( clipped ) discard;
#endif
#endif`,N$=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,R$=`#if NUM_CLIPPING_PLANES > 0
varying vec3 vClipPosition;
#endif`,I$=`#if NUM_CLIPPING_PLANES > 0
vClipPosition = - mvPosition.xyz;
#endif`,k$=`#if defined( USE_COLOR_ALPHA )
diffuseColor *= vColor;
#elif defined( USE_COLOR )
diffuseColor.rgb *= vColor;
#endif`,L$=`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR )
varying vec3 vColor;
#endif`,D$=`#if defined( USE_COLOR_ALPHA )
varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
varying vec3 vColor;
#endif`,F$=`#if defined( USE_COLOR_ALPHA )
vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
vColor.xyz *= instanceColor.xyz;
#endif`,j$=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
vec3 pow2( const in vec3 x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
highp float rand( const in vec2 uv ) {
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
float precisionSafeLength( vec3 v ) { return length( v ); }
#else
float precisionSafeLength( vec3 v ) {
float maxComponent = max3( abs( v ) );
return length( v / maxComponent ) * maxComponent;
}
#endif
struct IncidentLight {
vec3 color;
vec3 direction;
bool visible;
};
struct ReflectedLight {
vec3 directDiffuse;
vec3 directSpecular;
vec3 indirectDiffuse;
vec3 indirectSpecular;
};
#ifdef USE_ALPHAHASH
varying vec3 vPosition;
#endif
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
mat3 transposeMat3( const in mat3 m ) {
mat3 tmp;
tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
return tmp;
}
float luminance( const in vec3 rgb ) {
const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );
return dot( weights, rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
return vec2( u, v );
}
vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
} // validated`,O$=`#ifdef ENVMAP_TYPE_CUBE_UV
#define cubeUV_minMipLevel 4.0
#define cubeUV_minTileSize 16.0
float getFace( vec3 direction ) {
vec3 absDirection = abs( direction );
float face = - 1.0;
if ( absDirection.x > absDirection.z ) {
if ( absDirection.x > absDirection.y )
face = direction.x > 0.0 ? 0.0 : 3.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
} else {
if ( absDirection.z > absDirection.y )
face = direction.z > 0.0 ? 2.0 : 5.0;
else
face = direction.y > 0.0 ? 1.0 : 4.0;
}
return face;
}
vec2 getUV( vec3 direction, float face ) {
vec2 uv;
if ( face == 0.0 ) {
uv = vec2( direction.z, direction.y ) / abs( direction.x );
} else if ( face == 1.0 ) {
uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
} else if ( face == 2.0 ) {
uv = vec2( - direction.x, direction.y ) / abs( direction.z );
} else if ( face == 3.0 ) {
uv = vec2( - direction.z, direction.y ) / abs( direction.x );
} else if ( face == 4.0 ) {
uv = vec2( - direction.x, direction.z ) / abs( direction.y );
} else {
uv = vec2( direction.x, direction.y ) / abs( direction.z );
}
return 0.5 * ( uv + 1.0 );
}
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
float face = getFace( direction );
float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
mipInt = max( mipInt, cubeUV_minMipLevel );
float faceSize = exp2( mipInt );
highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
if ( face > 2.0 ) {
uv.y += faceSize;
face -= 3.0;
}
uv.x += face * faceSize;
uv.x += filterInt * 3.0 * cubeUV_minTileSize;
uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
uv.x *= CUBEUV_TEXEL_WIDTH;
uv.y *= CUBEUV_TEXEL_HEIGHT;
#ifdef texture2DGradEXT
return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
#else
return texture2D( envMap, uv ).rgb;
#endif
}
#define cubeUV_r0 1.0
#define cubeUV_m0 - 2.0
#define cubeUV_r1 0.8
#define cubeUV_m1 - 1.0
#define cubeUV_r4 0.4
#define cubeUV_m4 2.0
#define cubeUV_r5 0.305
#define cubeUV_m5 3.0
#define cubeUV_r6 0.21
#define cubeUV_m6 4.0
float roughnessToMip( float roughness ) {
float mip = 0.0;
if ( roughness >= cubeUV_r1 ) {
mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
} else if ( roughness >= cubeUV_r4 ) {
mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
} else if ( roughness >= cubeUV_r5 ) {
mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
} else if ( roughness >= cubeUV_r6 ) {
mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
} else {
mip = - 2.0 * log2( 1.16 * roughness ); }
return mip;
}
vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
float mipF = fract( mip );
float mipInt = floor( mip );
vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
if ( mipF == 0.0 ) {
return vec4( color0, 1.0 );
} else {
vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
return vec4( mix( color0, color1, mipF ), 1.0 );
}
}
#endif`,U$=`vec3 transformedNormal = objectNormal;
#ifdef USE_TANGENT
vec3 transformedTangent = objectTangent;
#endif
#ifdef USE_BATCHING
mat3 bm = mat3( batchingMatrix );
transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
transformedNormal = bm * transformedNormal;
#ifdef USE_TANGENT
transformedTangent = bm * transformedTangent;
#endif
#endif
#ifdef USE_INSTANCING
mat3 im = mat3( instanceMatrix );
transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
transformedNormal = im * transformedNormal;
#ifdef USE_TANGENT
transformedTangent = im * transformedTangent;
#endif
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
#ifdef FLIP_SIDED
transformedTangent = - transformedTangent;
#endif
#endif`,z$=`#ifdef USE_DISPLACEMENTMAP
uniform sampler2D displacementMap;
uniform float displacementScale;
uniform float displacementBias;
#endif`,B$=`#ifdef USE_DISPLACEMENTMAP
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );
#endif`,V$=`#ifdef USE_EMISSIVEMAP
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,H$=`#ifdef USE_EMISSIVEMAP
uniform sampler2D emissiveMap;
#endif`,W$="gl_FragColor = linearToOutputTexel( gl_FragColor );",G$=`
const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(
vec3( 0.8224621, 0.177538, 0.0 ),
vec3( 0.0331941, 0.9668058, 0.0 ),
vec3( 0.0170827, 0.0723974, 0.9105199 )
);
const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(
vec3( 1.2249401, - 0.2249404, 0.0 ),
vec3( - 0.0420569, 1.0420571, 0.0 ),
vec3( - 0.0196376, - 0.0786361, 1.0982735 )
);
vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {
return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );
}
vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {
return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );
}
vec4 LinearTransferOETF( in vec4 value ) {
return value;
}
vec4 sRGBTransferOETF( in vec4 value ) {
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}
vec4 LinearToLinear( in vec4 value ) {
return value;
}
vec4 LinearTosRGB( in vec4 value ) {
return sRGBTransferOETF( value );
}`,q$=`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vec3 cameraToFrag;
if ( isOrthographic ) {
cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToFrag = normalize( vWorldPosition - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vec3 reflectVec = reflect( cameraToFrag, worldNormal );
#else
vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
#endif
#else
vec3 reflectVec = vReflect;
#endif
#ifdef ENVMAP_TYPE_CUBE
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
#else
vec4 envColor = vec4( 0.0 );
#endif
#ifdef ENVMAP_BLENDING_MULTIPLY
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_MIX )
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
#elif defined( ENVMAP_BLENDING_ADD )
outgoingLight += envColor.xyz * specularStrength * reflectivity;
#endif
#endif`,X$=`#ifdef USE_ENVMAP
uniform float envMapIntensity;
uniform float flipEnvMap;
#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#else
uniform sampler2D envMap;
#endif
#endif`,$$=`#ifdef USE_ENVMAP
uniform float reflectivity;
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
uniform float refractionRatio;
#else
varying vec3 vReflect;
#endif
#endif`,Y$=`#ifdef USE_ENVMAP
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
#define ENV_WORLDPOS
#endif
#ifdef ENV_WORLDPOS
varying vec3 vWorldPosition;
#else
varying vec3 vReflect;
uniform float refractionRatio;
#endif
#endif`,Q$=`#ifdef USE_ENVMAP
#ifdef ENV_WORLDPOS
vWorldPosition = worldPosition.xyz;
#else
vec3 cameraToVertex;
if ( isOrthographic ) {
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
} else {
cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
}
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
#ifdef ENVMAP_MODE_REFLECTION
vReflect = reflect( cameraToVertex, worldNormal );
#else
vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
#endif
#endif
#endif`,K$=`#ifdef USE_FOG
vFogDepth = - mvPosition.z;
#endif`,Z$=`#ifdef USE_FOG
varying float vFogDepth;
#endif`,J$=`#ifdef USE_FOG
#ifdef FOG_EXP2
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
#else
float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
#endif
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,eY=`#ifdef USE_FOG
uniform vec3 fogColor;
varying float vFogDepth;
#ifdef FOG_EXP2
uniform float fogDensity;
#else
uniform float fogNear;
uniform float fogFar;
#endif
#endif`,tY=`#ifdef USE_GRADIENTMAP
uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
float dotNL = dot( normal, lightDirection );
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
#ifdef USE_GRADIENTMAP
return vec3( texture2D( gradientMap, coord ).r );
#else
vec2 fw = fwidth( coord ) * 0.5;
return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
#endif
}`,nY=`#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
reflectedLight.indirectDiffuse += lightMapIrradiance;
#endif`,iY=`#ifdef USE_LIGHTMAP
uniform sampler2D lightMap;
uniform float lightMapIntensity;
#endif`,rY=`LambertMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularStrength = specularStrength;`,sY=`varying vec3 vViewPosition;
struct LambertMaterial {
vec3 diffuseColor;
float specularStrength;
};
void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Lambert
#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,aY=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
#if defined( USE_LIGHT_PROBES )
uniform vec3 lightProbe[ 9 ];
#endif
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
float x = normal.x, y = normal.y, z = normal.z;
vec3 result = shCoefficients[ 0 ] * 0.886227;
result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
vec3 irradiance = ambientLightColor;
return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
#if defined ( LEGACY_LIGHTS )
if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );
}
return 1.0;
#else
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
if ( cutoffDistance > 0.0 ) {
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
}
return distanceFalloff;
#endif
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
struct DirectionalLight {
vec3 direction;
vec3 color;
};
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
light.color = directionalLight.color;
light.direction = directionalLight.direction;
light.visible = true;
}
#endif
#if NUM_POINT_LIGHTS > 0
struct PointLight {
vec3 position;
vec3 color;
float distance;
float decay;
};
uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
vec3 lVector = pointLight.position - geometryPosition;
light.direction = normalize( lVector );
float lightDistance = length( lVector );
light.color = pointLight.color;
light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
light.visible = ( light.color != vec3( 0.0 ) );
}
#endif
#if NUM_SPOT_LIGHTS > 0
struct SpotLight {
vec3 position;
vec3 direction;
vec3 color;
float distance;
float decay;
float coneCos;
float penumbraCos;
};
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
vec3 lVector = spotLight.position - geometryPosition;
light.direction = normalize( lVector );
float angleCos = dot( light.direction, spotLight.direction );
float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
if ( spotAttenuation > 0.0 ) {
float lightDistance = length( lVector );
light.color = spotLight.color * spotAttenuation;
light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
light.visible = ( light.color != vec3( 0.0 ) );
} else {
light.color = vec3( 0.0 );
light.visible = false;
}
}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
struct RectAreaLight {
vec3 color;
vec3 position;
vec3 halfWidth;
vec3 halfHeight;
};
uniform sampler2D ltc_1; uniform sampler2D ltc_2;
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
struct HemisphereLight {
vec3 direction;
vec3 skyColor;
vec3 groundColor;
};
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
float dotNL = dot( normal, hemiLight.direction );
float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
return irradiance;
}
#endif`,oY=`#ifdef USE_ENVMAP
vec3 getIBLIrradiance( const in vec3 normal ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
return PI * envMapColor.rgb * envMapIntensity;
#else
return vec3( 0.0 );
#endif
}
vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 reflectVec = reflect( - viewDir, normal );
reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
return envMapColor.rgb * envMapIntensity;
#else
return vec3( 0.0 );
#endif
}
#ifdef USE_ANISOTROPY
vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
#ifdef ENVMAP_TYPE_CUBE_UV
vec3 bentNormal = cross( bitangent, viewDir );
bentNormal = normalize( cross( bentNormal, bitangent ) );
bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
return getIBLRadiance( viewDir, bentNormal, roughness );
#else
return vec3( 0.0 );
#endif
}
#endif
#endif`,lY=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,cY=`varying vec3 vViewPosition;
struct ToonMaterial {
vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_Toon
#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,uY=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,dY=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
vec3 diffuseColor;
vec3 specularColor;
float specularShininess;
float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct RE_Direct_BlinnPhong
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,hY=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
material.ior = ior;
#ifdef USE_SPECULAR
float specularIntensityFactor = specularIntensity;
vec3 specularColorFactor = specularColor;
#ifdef USE_SPECULAR_COLORMAP
specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
#endif
material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
#else
float specularIntensityFactor = 1.0;
vec3 specularColorFactor = vec3( 1.0 );
material.specularF90 = 1.0;
#endif
material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
#else
material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
material.clearcoat = clearcoat;
material.clearcoatRoughness = clearcoatRoughness;
material.clearcoatF0 = vec3( 0.04 );
material.clearcoatF90 = 1.0;
#ifdef USE_CLEARCOATMAP
material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
#endif
material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
material.clearcoatRoughness += geometryRoughness;
material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_IRIDESCENCE
material.iridescence = iridescence;
material.iridescenceIOR = iridescenceIOR;
#ifdef USE_IRIDESCENCEMAP
material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
#else
material.iridescenceThickness = iridescenceThicknessMaximum;
#endif
#endif
#ifdef USE_SHEEN
material.sheenColor = sheenColor;
#ifdef USE_SHEEN_COLORMAP
material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
#endif
material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
#ifdef USE_SHEEN_ROUGHNESSMAP
material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
#endif
#endif
#ifdef USE_ANISOTROPY
#ifdef USE_ANISOTROPYMAP
mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
#else
vec2 anisotropyV = anisotropyVector;
#endif
material.anisotropy = length( anisotropyV );
if( material.anisotropy == 0.0 ) {
anisotropyV = vec2( 1.0, 0.0 );
} else {
anisotropyV /= material.anisotropy;
material.anisotropy = saturate( material.anisotropy );
}
material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
#endif`,fY=`struct PhysicalMaterial {
vec3 diffuseColor;
float roughness;
vec3 specularColor;
float specularF90;
#ifdef USE_CLEARCOAT
float clearcoat;
float clearcoatRoughness;
vec3 clearcoatF0;
float clearcoatF90;
#endif
#ifdef USE_IRIDESCENCE
float iridescence;
float iridescenceIOR;
float iridescenceThickness;
vec3 iridescenceFresnel;
vec3 iridescenceF0;
#endif
#ifdef USE_SHEEN
vec3 sheenColor;
float sheenRoughness;
#endif
#ifdef IOR
float ior;
#endif
#ifdef USE_TRANSMISSION
float transmission;
float transmissionAlpha;
float thickness;
float attenuationDistance;
vec3 attenuationColor;
#endif
#ifdef USE_ANISOTROPY
float anisotropy;
float alphaT;
vec3 anisotropyT;
vec3 anisotropyB;
#endif
};
vec3 clearcoatSpecularDirect = vec3( 0.0 );
vec3 clearcoatSpecularIndirect = vec3( 0.0 );
vec3 sheenSpecularDirect = vec3( 0.0 );
vec3 sheenSpecularIndirect = vec3(0.0 );
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
float x2 = x * x;
float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
float a2 = pow2( alpha );
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
float a2 = pow2( alpha );
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
return RECIPROCAL_PI * a2 / pow2( denom );
}
#ifdef USE_ANISOTROPY
float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
float v = 0.5 / ( gv + gl );
return saturate(v);
}
float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
float a2 = alphaT * alphaB;
highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
highp float v2 = dot( v, v );
float w2 = a2 / v2;
return RECIPROCAL_PI * a2 * pow2 ( w2 );
}
#endif
#ifdef USE_CLEARCOAT
vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
vec3 f0 = material.clearcoatF0;
float f90 = material.clearcoatF90;
float roughness = material.clearcoatRoughness;
float alpha = pow2( roughness );
vec3 halfDir = normalize( lightDir + viewDir );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( f0, f90, dotVH );
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
float D = D_GGX( alpha, dotNH );
return F * ( V * D );
}
#endif
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
vec3 f0 = material.specularColor;
float f90 = material.specularF90;
float roughness = material.roughness;
float alpha = pow2( roughness );
vec3 halfDir = normalize( lightDir + viewDir );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float dotVH = saturate( dot( viewDir, halfDir ) );
vec3 F = F_Schlick( f0, f90, dotVH );
#ifdef USE_IRIDESCENCE
F = mix( F, material.iridescenceFresnel, material.iridescence );
#endif
#ifdef USE_ANISOTROPY
float dotTL = dot( material.anisotropyT, lightDir );
float dotTV = dot( material.anisotropyT, viewDir );
float dotTH = dot( material.anisotropyT, halfDir );
float dotBL = dot( material.anisotropyB, lightDir );
float dotBV = dot( material.anisotropyB, viewDir );
float dotBH = dot( material.anisotropyB, halfDir );
float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
#else
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
float D = D_GGX( alpha, dotNH );
#endif
return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
const float LUT_SIZE = 64.0;
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
const float LUT_BIAS = 0.5 / LUT_SIZE;
float dotNV = saturate( dot( N, V ) );
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
uv = uv * LUT_SCALE + LUT_BIAS;
return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
float l = length( f );
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
float x = dot( v1, v2 );
float y = abs( x );
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
float b = 3.4175940 + ( 4.1616724 + y ) * y;
float v = a / b;
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
vec3 lightNormal = cross( v1, v2 );
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
vec3 T1, T2;
T1 = normalize( V - N * dot( V, N ) );
T2 = - cross( N, T1 );
mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
vec3 coords[ 4 ];
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
coords[ 0 ] = normalize( coords[ 0 ] );
coords[ 1 ] = normalize( coords[ 1 ] );
coords[ 2 ] = normalize( coords[ 2 ] );
coords[ 3 ] = normalize( coords[ 3 ] );
vec3 vectorFormFactor = vec3( 0.0 );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
return vec3( result );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
float alpha = pow2( roughness );
float invAlpha = 1.0 / alpha;
float cos2h = dotNH * dotNH;
float sin2h = max( 1.0 - cos2h, 0.0078125 );
return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
vec3 halfDir = normalize( lightDir + viewDir );
float dotNL = saturate( dot( normal, lightDir ) );
float dotNV = saturate( dot( normal, viewDir ) );
float dotNH = saturate( dot( normal, halfDir ) );
float D = D_Charlie( sheenRoughness, dotNH );
float V = V_Neubelt( dotNV, dotNL );
return sheenColor * ( D * V );
}
#endif
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
float dotNV = saturate( dot( normal, viewDir ) );
float r2 = roughness * roughness;
float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
return saturate( DG * RECIPROCAL_PI );
}
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
float dotNV = saturate( dot( normal, viewDir ) );
const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
vec4 r = roughness * c0 + c1;
float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
return fab;
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
vec2 fab = DFGApprox( normal, viewDir, roughness );
return specularColor * fab.x + specularF90 * fab.y;
}
#ifdef USE_IRIDESCENCE
void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#else
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
#endif
vec2 fab = DFGApprox( normal, viewDir, roughness );
#ifdef USE_IRIDESCENCE
vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
#else
vec3 Fr = specularColor;
#endif
vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
float Ess = fab.x + fab.y;
float Ems = 1.0 - Ess;
vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
singleScatter += FssEss;
multiScatter += Fms * Ems;
}
#if NUM_RECT_AREA_LIGHTS > 0
void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
vec3 normal = geometryNormal;
vec3 viewDir = geometryViewDir;
vec3 position = geometryPosition;
vec3 lightPos = rectAreaLight.position;
vec3 halfWidth = rectAreaLight.halfWidth;
vec3 halfHeight = rectAreaLight.halfHeight;
vec3 lightColor = rectAreaLight.color;
float roughness = material.roughness;
vec3 rectCoords[ 4 ];
rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
vec2 uv = LTC_Uv( normal, viewDir, roughness );
vec4 t1 = texture2D( ltc_1, uv );
vec4 t2 = texture2D( ltc_2, uv );
mat3 mInv = mat3(
vec3( t1.x, 0, t1.y ),
vec3( 0, 1, 0 ),
vec3( t1.z, 0, t1.w )
);
vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
vec3 irradiance = dotNL * directLight.color;
#ifdef USE_CLEARCOAT
float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
vec3 ccIrradiance = dotNLcc * directLight.color;
clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
#endif
#ifdef USE_SHEEN
sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
#endif
reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
#ifdef USE_CLEARCOAT
clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
#endif
#ifdef USE_SHEEN
sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
#endif
vec3 singleScattering = vec3( 0.0 );
vec3 multiScattering = vec3( 0.0 );
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
#ifdef USE_IRIDESCENCE
computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
#else
computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
#endif
vec3 totalScattering = singleScattering + multiScattering;
vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
reflectedLight.indirectSpecular += radiance * singleScattering;
reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct RE_Direct_Physical
#define RE_Direct_RectArea RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,pY=`
vec3 geometryPosition = - vViewPosition;
vec3 geometryNormal = normal;
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
vec3 geometryClearcoatNormal = vec3( 0.0 );
#ifdef USE_CLEARCOAT
geometryClearcoatNormal = clearcoatNormal;
#endif
#ifdef USE_IRIDESCENCE
float dotNVi = saturate( dot( normal, geometryViewDir ) );
if ( material.iridescenceThickness == 0.0 ) {
material.iridescence = 0.0;
} else {
material.iridescence = saturate( material.iridescence );
}
if ( material.iridescence > 0.0 ) {
material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
}
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
PointLight pointLight;
#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
pointLight = pointLights[ i ];
getPointLightInfo( pointLight, geometryPosition, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
pointLightShadow = pointLightShadows[ i ];
directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
#endif
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
SpotLight spotLight;
vec4 spotColor;
vec3 spotLightCoord;
bool inSpotLightMap;
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
spotLight = spotLights[ i ];
getSpotLightInfo( spotLight, geometryPosition, directLight );
#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
#else
#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
#endif
#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
#endif
#undef SPOT_LIGHT_MAP_INDEX
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
spotLightShadow = spotLightShadows[ i ];
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
DirectionalLight directionalLight;
#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLightShadow;
#endif
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
directionalLight = directionalLights[ i ];
getDirectionalLightInfo( directionalLight, directLight );
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
directionalLightShadow = directionalLightShadows[ i ];
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
#endif
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
RectAreaLight rectAreaLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
rectAreaLight = rectAreaLights[ i ];
RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
}
#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
vec3 iblIrradiance = vec3( 0.0 );
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
#if defined( USE_LIGHT_PROBES )
irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
#endif
#if ( NUM_HEMI_LIGHTS > 0 )
#pragma unroll_loop_start
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
}
#pragma unroll_loop_end
#endif
#endif
#if defined( RE_IndirectSpecular )
vec3 radiance = vec3( 0.0 );
vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,mY=`#if defined( RE_IndirectDiffuse )
#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
irradiance += lightMapIrradiance;
#endif
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
iblIrradiance += getIBLIrradiance( geometryNormal );
#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
#ifdef USE_ANISOTROPY
radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
#else
radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
#endif
#ifdef USE_CLEARCOAT
clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
#endif
#endif`,gY=`#if defined( RE_IndirectDiffuse )
RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
#endif`,xY=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,yY=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
uniform float logDepthBufFC;
varying float vFragDepth;
varying float vIsPerspective;
#endif`,vY=`#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
varying float vFragDepth;
varying float vIsPerspective;
#else
uniform float logDepthBufFC;
#endif
#endif`,wY=`#ifdef USE_LOGDEPTHBUF
#ifdef USE_LOGDEPTHBUF_EXT
vFragDepth = 1.0 + gl_Position.w;
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
#else
if ( isPerspectiveMatrix( projectionMatrix ) ) {
gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
gl_Position.z *= gl_Position.w;
}
#endif
#endif`,bY=`#ifdef USE_MAP
vec4 sampledDiffuseColor = texture2D( map, vMapUv );
#ifdef DECODE_VIDEO_TEXTURE
sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
#endif
diffuseColor *= sampledDiffuseColor;
#endif`,_Y=`#ifdef USE_MAP
uniform sampler2D map;
#endif`,SY=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
#if defined( USE_POINTS_UV )
vec2 uv = vUv;
#else
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
#endif
#endif
#ifdef USE_MAP
diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,AY=`#if defined( USE_POINTS_UV )
varying vec2 vUv;
#else
#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
uniform mat3 uvTransform;
#endif
#endif
#ifdef USE_MAP
uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
uniform sampler2D alphaMap;
#endif`,MY=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
metalnessFactor *= texelMetalness.b;
#endif`,TY=`#ifdef USE_METALNESSMAP
uniform sampler2D metalnessMap;
#endif`,EY=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )
vColor *= morphTargetBaseInfluence;
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
#if defined( USE_COLOR_ALPHA )
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
#elif defined( USE_COLOR )
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
#endif
}
#endif`,CY=`#ifdef USE_MORPHNORMALS
objectNormal *= morphTargetBaseInfluence;
#ifdef MORPHTARGETS_TEXTURE
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
}
#else
objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
#endif
#endif`,PY=`#ifdef USE_MORPHTARGETS
uniform float morphTargetBaseInfluence;
#ifdef MORPHTARGETS_TEXTURE
uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
uniform sampler2DArray morphTargetsTexture;
uniform ivec2 morphTargetsTextureSize;
vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
int y = texelIndex / morphTargetsTextureSize.x;
int x = texelIndex - y * morphTargetsTextureSize.x;
ivec3 morphUV = ivec3( x, y, morphTargetIndex );
return texelFetch( morphTargetsTexture, morphUV, 0 );
}
#else
#ifndef USE_MORPHNORMALS
uniform float morphTargetInfluences[ 8 ];
#else
uniform float morphTargetInfluences[ 4 ];
#endif
#endif
#endif`,NY=`#ifdef USE_MORPHTARGETS
transformed *= morphTargetBaseInfluence;
#ifdef MORPHTARGETS_TEXTURE
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
}
#else
transformed += morphTarget0 * morphTargetInfluences[ 0 ];
transformed += morphTarget1 * morphTargetInfluences[ 1 ];
transformed += morphTarget2 * morphTargetInfluences[ 2 ];
transformed += morphTarget3 * morphTargetInfluences[ 3 ];
#ifndef USE_MORPHNORMALS
transformed += morphTarget4 * morphTargetInfluences[ 4 ];
transformed += morphTarget5 * morphTargetInfluences[ 5 ];
transformed += morphTarget6 * morphTargetInfluences[ 6 ];
transformed += morphTarget7 * morphTargetInfluences[ 7 ];
#endif
#endif
#endif`,RY=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
vec3 fdx = dFdx( vViewPosition );
vec3 fdy = dFdy( vViewPosition );
vec3 normal = normalize( cross( fdx, fdy ) );
#else
vec3 normal = normalize( vNormal );
#ifdef DOUBLE_SIDED
normal *= faceDirection;
#endif
#endif
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
#ifdef USE_TANGENT
mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
#else
mat3 tbn = getTangentFrame( - vViewPosition, normal,
#if defined( USE_NORMALMAP )
vNormalMapUv
#elif defined( USE_CLEARCOAT_NORMALMAP )
vClearcoatNormalMapUv
#else
vUv
#endif
);
#endif
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
tbn[0] *= faceDirection;
tbn[1] *= faceDirection;
#endif
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
#ifdef USE_TANGENT
mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
#else
mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
#endif
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
tbn2[0] *= faceDirection;
tbn2[1] *= faceDirection;
#endif
#endif
vec3 nonPerturbedNormal = normal;`,IY=`#ifdef USE_NORMALMAP_OBJECTSPACE
normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
#ifdef FLIP_SIDED
normal = - normal;
#endif
#ifdef DOUBLE_SIDED
normal = normal * faceDirection;
#endif
normal = normalize( normalMatrix * normal );
#elif defined( USE_NORMALMAP_TANGENTSPACE )
vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
mapN.xy *= normalScale;
normal = normalize( tbn * mapN );
#elif defined( USE_BUMPMAP )
normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,kY=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,LY=`#ifndef FLAT_SHADED
varying vec3 vNormal;
#ifdef USE_TANGENT
varying vec3 vTangent;
varying vec3 vBitangent;
#endif
#endif`,DY=`#ifndef FLAT_SHADED
vNormal = normalize( transformedNormal );
#ifdef USE_TANGENT
vTangent = normalize( transformedTangent );
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
#endif
#endif`,FY=`#ifdef USE_NORMALMAP
uniform sampler2D normalMap;
uniform vec2 normalScale;
#endif
#ifdef USE_NORMALMAP_OBJECTSPACE
uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
vec3 q0 = dFdx( eye_pos.xyz );
vec3 q1 = dFdy( eye_pos.xyz );
vec2 st0 = dFdx( uv.st );
vec2 st1 = dFdy( uv.st );
vec3 N = surf_norm;
vec3 q1perp = cross( q1, N );
vec3 q0perp = cross( N, q0 );
vec3 T = q1perp * st0.x + q0perp * st1.x;
vec3 B = q1perp * st0.y + q0perp * st1.y;
float det = max( dot( T, T ), dot( B, B ) );
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
return mat3( T * scale, B * scale, N );
}
#endif`,jY=`#ifdef USE_CLEARCOAT
vec3 clearcoatNormal = nonPerturbedNormal;
#endif`,OY=`#ifdef USE_CLEARCOAT_NORMALMAP
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
clearcoatMapN.xy *= clearcoatNormalScale;
clearcoatNormal = normalize( tbn2 * clearcoatMapN );
#endif`,UY=`#ifdef USE_CLEARCOATMAP
uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
uniform sampler2D clearcoatNormalMap;
uniform vec2 clearcoatNormalScale;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform sampler2D clearcoatRoughnessMap;
#endif`,zY=`#ifdef USE_IRIDESCENCEMAP
uniform sampler2D iridescenceMap;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform sampler2D iridescenceThicknessMap;
#endif`,BY=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= material.transmissionAlpha;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,VY=`vec3 packNormalToRGB( const in vec3 normal ) {
return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
vec4 r = vec4( fract( v * PackFactors ), v );
r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
return dot( v, UnpackFactors );
}
vec2 packDepthToRG( in highp float v ) {
return packDepthToRGBA( v ).yx;
}
float unpackRGToDepth( const in highp vec2 v ) {
return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );
}
vec4 pack2HalfToRGBA( vec2 v ) {
vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( vec4 v ) {
return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
return depth * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
return ( near * far ) / ( ( far - near ) * depth - far );
}`,HY=`#ifdef PREMULTIPLIED_ALPHA
gl_FragColor.rgb *= gl_FragColor.a;
#endif`,WY=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
mvPosition = batchingMatrix * mvPosition;
#endif
#ifdef USE_INSTANCING
mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,GY=`#ifdef DITHERING
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,qY=`#ifdef DITHERING
vec3 dithering( vec3 color ) {
float grid_position = rand( gl_FragCoord.xy );
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
return color + dither_shift_RGB;
}
#endif`,XY=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
roughnessFactor *= texelRoughness.g;
#endif`,$Y=`#ifdef USE_ROUGHNESSMAP
uniform sampler2D roughnessMap;
#endif`,YY=`#if NUM_SPOT_LIGHT_COORDS > 0
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#if NUM_SPOT_LIGHT_MAPS > 0
uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
#endif
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
struct SpotLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
}
vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
return unpackRGBATo2Half( texture2D( shadow, uv ) );
}
float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
float occlusion = 1.0;
vec2 distribution = texture2DDistribution( shadow, uv );
float hard_shadow = step( compare , distribution.x );
if (hard_shadow != 1.0 ) {
float distance = compare - distribution.x ;
float variance = max( 0.00000, distribution.y * distribution.y );
float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
}
return occlusion;
}
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
float shadow = 1.0;
shadowCoord.xyz /= shadowCoord.w;
shadowCoord.z += shadowBias;
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
if ( frustumTest ) {
#if defined( SHADOWMAP_TYPE_PCF )
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float dx0 = - texelSize.x * shadowRadius;
float dy0 = - texelSize.y * shadowRadius;
float dx1 = + texelSize.x * shadowRadius;
float dy1 = + texelSize.y * shadowRadius;
float dx2 = dx0 / 2.0;
float dy2 = dy0 / 2.0;
float dx3 = dx1 / 2.0;
float dy3 = dy1 / 2.0;
shadow = (
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
) * ( 1.0 / 17.0 );
#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
float dx = texelSize.x;
float dy = texelSize.y;
vec2 uv = shadowCoord.xy;
vec2 f = fract( uv * shadowMapSize + 0.5 );
uv -= f * texelSize;
shadow = (
texture2DCompare( shadowMap, uv, shadowCoord.z ) +
texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
f.x ) +
mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
f.x ) +
mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
f.y ) +
mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
f.y ) +
mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
f.x ),
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
f.x ),
f.y )
) * ( 1.0 / 9.0 );
#elif defined( SHADOWMAP_TYPE_VSM )
shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
#else
shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
#endif
}
return shadow;
}
vec2 cubeToUV( vec3 v, float texelSizeY ) {
vec3 absV = abs( v );
float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
absV *= scaleToCube;
v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
vec2 planar = v.xy;
float almostATexel = 1.5 * texelSizeY;
float almostOne = 1.0 - almostATexel;
if ( absV.z >= almostOne ) {
if ( v.z > 0.0 )
planar.x = 4.0 - v.x;
} else if ( absV.x >= almostOne ) {
float signX = sign( v.x );
planar.x = v.z * signX + 2.0 * signX;
} else if ( absV.y >= almostOne ) {
float signY = sign( v.y );
planar.x = v.x + 2.0 * signY + 2.0;
planar.y = v.z * signY - 2.0;
}
return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
}
float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
vec3 lightToPosition = shadowCoord.xyz;
float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;
vec3 bd3D = normalize( lightToPosition );
#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
return (
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
) * ( 1.0 / 9.0 );
#else
return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
#endif
}
#endif`,QY=`#if NUM_SPOT_LIGHT_COORDS > 0
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
#endif
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
struct DirectionalLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
struct SpotLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
};
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
struct PointLightShadow {
float shadowBias;
float shadowNormalBias;
float shadowRadius;
vec2 shadowMapSize;
float shadowCameraNear;
float shadowCameraFar;
};
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
#endif
#endif`,KY=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
vec4 shadowWorldPosition;
#endif
#if defined( USE_SHADOWMAP )
#if NUM_DIR_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif
#endif
#if NUM_SPOT_LIGHT_COORDS > 0
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
shadowWorldPosition = worldPosition;
#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
#endif
vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
}
#pragma unroll_loop_end
#endif`,ZY=`float getShadowMask() {
float shadow = 1.0;
#ifdef USE_SHADOWMAP
#if NUM_DIR_LIGHT_SHADOWS > 0
DirectionalLightShadow directionalLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
directionalLight = directionalLightShadows[ i ];
shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHT_SHADOWS > 0
SpotLightShadow spotLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
spotLight = spotLightShadows[ i ];
shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
}
#pragma unroll_loop_end
#endif
#if NUM_POINT_LIGHT_SHADOWS > 0
PointLightShadow pointLight;
#pragma unroll_loop_start
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
pointLight = pointLightShadows[ i ];
shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
}
#pragma unroll_loop_end
#endif
#endif
return shadow;
}`,JY=`#ifdef USE_SKINNING
mat4 boneMatX = getBoneMatrix( skinIndex.x );
mat4 boneMatY = getBoneMatrix( skinIndex.y );
mat4 boneMatZ = getBoneMatrix( skinIndex.z );
mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,eQ=`#ifdef USE_SKINNING
uniform mat4 bindMatrix;
uniform mat4 bindMatrixInverse;
uniform highp sampler2D boneTexture;
mat4 getBoneMatrix( const in float i ) {
int size = textureSize( boneTexture, 0 ).x;
int j = int( i ) * 4;
int x = j % size;
int y = j / size;
vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
return mat4( v1, v2, v3, v4 );
}
#endif`,tQ=`#ifdef USE_SKINNING
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
vec4 skinned = vec4( 0.0 );
skinned += boneMatX * skinVertex * skinWeight.x;
skinned += boneMatY * skinVertex * skinWeight.y;
skinned += boneMatZ * skinVertex * skinWeight.z;
skinned += boneMatW * skinVertex * skinWeight.w;
transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,nQ=`#ifdef USE_SKINNING
mat4 skinMatrix = mat4( 0.0 );
skinMatrix += skinWeight.x * boneMatX;
skinMatrix += skinWeight.y * boneMatY;
skinMatrix += skinWeight.z * boneMatZ;
skinMatrix += skinWeight.w * boneMatW;
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
#ifdef USE_TANGENT
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
#endif
#endif`,iQ=`float specularStrength;
#ifdef USE_SPECULARMAP
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
specularStrength = texelSpecular.r;
#else
specularStrength = 1.0;
#endif`,rQ=`#ifdef USE_SPECULARMAP
uniform sampler2D specularMap;
#endif`,sQ=`#if defined( TONE_MAPPING )
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,aQ=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
return saturate( toneMappingExposure * color );
}
vec3 ReinhardToneMapping( vec3 color ) {
color *= toneMappingExposure;
return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
color *= toneMappingExposure;
color = max( vec3( 0.0 ), color - 0.004 );
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
const mat3 ACESInputMat = mat3(
vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),
vec3( 0.04823, 0.01566, 0.83777 )
);
const mat3 ACESOutputMat = mat3(
vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),
vec3( -0.07367, -0.00605, 1.07602 )
);
color *= toneMappingExposure / 0.6;
color = ACESInputMat * color;
color = RRTAndODTFit( color );
color = ACESOutputMat * color;
return saturate( color );
}
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
vec3( 1.6605, - 0.1246, - 0.0182 ),
vec3( - 0.5876, 1.1329, - 0.1006 ),
vec3( - 0.0728, - 0.0083, 1.1187 )
);
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
vec3( 0.6274, 0.0691, 0.0164 ),
vec3( 0.3293, 0.9195, 0.0880 ),
vec3( 0.0433, 0.0113, 0.8956 )
);
vec3 agxDefaultContrastApprox( vec3 x ) {
vec3 x2 = x * x;
vec3 x4 = x2 * x2;
return + 15.5 * x4 * x2
- 40.14 * x4 * x
+ 31.96 * x4
- 6.868 * x2 * x
+ 0.4298 * x2
+ 0.1191 * x
- 0.00232;
}
vec3 AgXToneMapping( vec3 color ) {
const mat3 AgXInsetMatrix = mat3(
vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
);
const mat3 AgXOutsetMatrix = mat3(
vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
);
const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;
color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
color *= toneMappingExposure;
color = AgXInsetMatrix * color;
color = max( color, 1e-10 ); color = log2( color );
color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
color = clamp( color, 0.0, 1.0 );
color = agxDefaultContrastApprox( color );
color = AgXOutsetMatrix * color;
color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
return color;
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,oQ=`#ifdef USE_TRANSMISSION
material.transmission = transmission;
material.transmissionAlpha = 1.0;
material.thickness = thickness;
material.attenuationDistance = attenuationDistance;
material.attenuationColor = attenuationColor;
#ifdef USE_TRANSMISSIONMAP
material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
#endif
#ifdef USE_THICKNESSMAP
material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
#endif
vec3 pos = vWorldPosition;
vec3 v = normalize( cameraPosition - pos );
vec3 n = inverseTransformDirection( normal, viewMatrix );
vec4 transmitted = getIBLVolumeRefraction(
n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,
material.attenuationColor, material.attenuationDistance );
material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
#endif`,lQ=`#ifdef USE_TRANSMISSION
uniform float transmission;
uniform float thickness;
uniform float attenuationDistance;
uniform vec3 attenuationColor;
#ifdef USE_TRANSMISSIONMAP
uniform sampler2D transmissionMap;
#endif
#ifdef USE_THICKNESSMAP
uniform sampler2D thicknessMap;
#endif
uniform vec2 transmissionSamplerSize;
uniform sampler2D transmissionSamplerMap;
uniform mat4 modelMatrix;
uniform mat4 projectionMatrix;
varying vec3 vWorldPosition;
float w0( float a ) {
return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
}
float w1( float a ) {
return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );
}
float w2( float a ){
return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
}
float w3( float a ) {
return ( 1.0 / 6.0 ) * ( a * a * a );
}
float g0( float a ) {
return w0( a ) + w1( a );
}
float g1( float a ) {
return w2( a ) + w3( a );
}
float h0( float a ) {
return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
}
float h1( float a ) {
return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
}
vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
uv = uv * texelSize.zw + 0.5;
vec2 iuv = floor( uv );
vec2 fuv = fract( uv );
float g0x = g0( fuv.x );
float g1x = g1( fuv.x );
float h0x = h0( fuv.x );
float h1x = h1( fuv.x );
float h0y = h0( fuv.y );
float h1y = h1( fuv.y );
vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
}
vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
vec2 fLodSizeInv = 1.0 / fLodSize;
vec2 cLodSizeInv = 1.0 / cLodSize;
vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
return mix( fSample, cSample, fract( lod ) );
}
vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
vec3 modelScale;
modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
return normalize( refractionVector ) * thickness * modelScale;
}
float applyIorToRoughness( const in float roughness, const in float ior ) {
return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
}
vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
}
vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
if ( isinf( attenuationDistance ) ) {
return vec3( 1.0 );
} else {
vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;
}
}
vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,
const in vec3 attenuationColor, const in float attenuationDistance ) {
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
vec3 refractedRayExit = position + transmissionRay;
vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
vec2 refractionCoords = ndcPos.xy / ndcPos.w;
refractionCoords += 1.0;
refractionCoords /= 2.0;
vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
vec3 attenuatedColor = transmittance * transmittedLight.rgb;
vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
}
#endif`,cQ=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
varying vec2 vUv;
#endif
#ifdef USE_MAP
varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
varying vec2 vNormalMapUv;
#endif
#ifdef USE_EMISSIVEMAP
varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_SPECULARMAP
varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
uniform mat3 transmissionMapTransform;
varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
uniform mat3 thicknessMapTransform;
varying vec2 vThicknessMapUv;
#endif`,uQ=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
varying vec2 vUv;
#endif
#ifdef USE_MAP
uniform mat3 mapTransform;
varying vec2 vMapUv;
#endif
#ifdef USE_ALPHAMAP
uniform mat3 alphaMapTransform;
varying vec2 vAlphaMapUv;
#endif
#ifdef USE_LIGHTMAP
uniform mat3 lightMapTransform;
varying vec2 vLightMapUv;
#endif
#ifdef USE_AOMAP
uniform mat3 aoMapTransform;
varying vec2 vAoMapUv;
#endif
#ifdef USE_BUMPMAP
uniform mat3 bumpMapTransform;
varying vec2 vBumpMapUv;
#endif
#ifdef USE_NORMALMAP
uniform mat3 normalMapTransform;
varying vec2 vNormalMapUv;
#endif
#ifdef USE_DISPLACEMENTMAP
uniform mat3 displacementMapTransform;
varying vec2 vDisplacementMapUv;
#endif
#ifdef USE_EMISSIVEMAP
uniform mat3 emissiveMapTransform;
varying vec2 vEmissiveMapUv;
#endif
#ifdef USE_METALNESSMAP
uniform mat3 metalnessMapTransform;
varying vec2 vMetalnessMapUv;
#endif
#ifdef USE_ROUGHNESSMAP
uniform mat3 roughnessMapTransform;
varying vec2 vRoughnessMapUv;
#endif
#ifdef USE_ANISOTROPYMAP
uniform mat3 anisotropyMapTransform;
varying vec2 vAnisotropyMapUv;
#endif
#ifdef USE_CLEARCOATMAP
uniform mat3 clearcoatMapTransform;
varying vec2 vClearcoatMapUv;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
uniform mat3 clearcoatNormalMapTransform;
varying vec2 vClearcoatNormalMapUv;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
uniform mat3 clearcoatRoughnessMapTransform;
varying vec2 vClearcoatRoughnessMapUv;
#endif
#ifdef USE_SHEEN_COLORMAP
uniform mat3 sheenColorMapTransform;
varying vec2 vSheenColorMapUv;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
uniform mat3 sheenRoughnessMapTransform;
varying vec2 vSheenRoughnessMapUv;
#endif
#ifdef USE_IRIDESCENCEMAP
uniform mat3 iridescenceMapTransform;
varying vec2 vIridescenceMapUv;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
uniform mat3 iridescenceThicknessMapTransform;
varying vec2 vIridescenceThicknessMapUv;
#endif
#ifdef USE_SPECULARMAP
uniform mat3 specularMapTransform;
varying vec2 vSpecularMapUv;
#endif
#ifdef USE_SPECULAR_COLORMAP
uniform mat3 specularColorMapTransform;
varying vec2 vSpecularColorMapUv;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
uniform mat3 specularIntensityMapTransform;
varying vec2 vSpecularIntensityMapUv;
#endif
#ifdef USE_TRANSMISSIONMAP
uniform mat3 transmissionMapTransform;
varying vec2 vTransmissionMapUv;
#endif
#ifdef USE_THICKNESSMAP
uniform mat3 thicknessMapTransform;
varying vec2 vThicknessMapUv;
#endif`,dQ=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
vUv = vec3( uv, 1 ).xy;
#endif
#ifdef USE_MAP
vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ALPHAMAP
vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_LIGHTMAP
vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_AOMAP
vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_BUMPMAP
vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_NORMALMAP
vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_DISPLACEMENTMAP
vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_EMISSIVEMAP
vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_METALNESSMAP
vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ROUGHNESSMAP
vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_ANISOTROPYMAP
vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOATMAP
vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCEMAP
vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_IRIDESCENCE_THICKNESSMAP
vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_COLORMAP
vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULARMAP
vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_COLORMAP
vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_TRANSMISSIONMAP
vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
#endif
#ifdef USE_THICKNESSMAP
vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
#endif`,hQ=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
vec4 worldPosition = vec4( transformed, 1.0 );
#ifdef USE_BATCHING
worldPosition = batchingMatrix * worldPosition;
#endif
#ifdef USE_INSTANCING
worldPosition = instanceMatrix * worldPosition;
#endif
worldPosition = modelMatrix * worldPosition;
#endif`;const fQ=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,pQ=`uniform sampler2D t2D;
uniform float backgroundIntensity;
varying vec2 vUv;
void main() {
vec4 texColor = texture2D( t2D, vUv );
#ifdef DECODE_VIDEO_TEXTURE
texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
#endif
texColor.rgb *= backgroundIntensity;
gl_FragColor = texColor;
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,mQ=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,gQ=`#ifdef ENVMAP_TYPE_CUBE
uniform samplerCube envMap;
#elif defined( ENVMAP_TYPE_CUBE_UV )
uniform sampler2D envMap;
#endif
uniform float flipEnvMap;
uniform float backgroundBlurriness;
uniform float backgroundIntensity;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
#ifdef ENVMAP_TYPE_CUBE
vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
#elif defined( ENVMAP_TYPE_CUBE_UV )
vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );
#else
vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
#endif
texColor.rgb *= backgroundIntensity;
gl_FragColor = texColor;
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,xQ=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
gl_Position.z = gl_Position.w;
}`,yQ=`uniform samplerCube tCube;
uniform float tFlip;
uniform float opacity;
varying vec3 vWorldDirection;
void main() {
vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
gl_FragColor = texColor;
gl_FragColor.a *= opacity;
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,vQ=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
#include <uv_vertex>
#include <batching_vertex>
#include <skinbase_vertex>
#ifdef USE_DISPLACEMENTMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vHighPrecisionZW = gl_Position.zw;
}`,wQ=`#if DEPTH_PACKING == 3200
uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( 1.0 );
#if DEPTH_PACKING == 3200
diffuseColor.a = opacity;
#endif
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <logdepthbuf_fragment>
float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
#if DEPTH_PACKING == 3200
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
#elif DEPTH_PACKING == 3201
gl_FragColor = packDepthToRGBA( fragCoordZ );
#endif
}`,bQ=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <batching_vertex>
#include <skinbase_vertex>
#ifdef USE_DISPLACEMENTMAP
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <worldpos_vertex>
#include <clipping_planes_vertex>
vWorldPosition = worldPosition.xyz;
}`,_Q=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( 1.0 );
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
float dist = length( vWorldPosition - referencePosition );
dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
dist = saturate( dist );
gl_FragColor = packDepthToRGBA( dist );
}`,SQ=`varying vec3 vWorldDirection;
#include <common>
void main() {
vWorldDirection = transformDirection( position, modelMatrix );
#include <begin_vertex>
#include <project_vertex>
}`,AQ=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
vec3 direction = normalize( vWorldDirection );
vec2 sampleUV = equirectUv( direction );
gl_FragColor = texture2D( tEquirect, sampleUV );
#include <tonemapping_fragment>
#include <colorspace_fragment>
}`,MQ=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
vLineDistance = scale * lineDistance;
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`,TQ=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
if ( mod( vLineDistance, totalSize ) > dashSize ) {
discard;
}
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
outgoingLight = diffuseColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,EQ=`#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#endif
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <envmap_vertex>
#include <fog_vertex>
}`,CQ=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <specularmap_fragment>
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
#ifdef USE_LIGHTMAP
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
#else
reflectedLight.indirectDiffuse += vec3( 1.0 );
#endif
#include <aomap_fragment>
reflectedLight.indirectDiffuse *= diffuseColor.rgb;
vec3 outgoingLight = reflectedLight.indirectDiffuse;
#include <envmap_fragment>
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,PQ=`#define LAMBERT
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,NQ=`#define LAMBERT
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_lambert_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <specularmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_lambert_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include <envmap_fragment>
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,RQ=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
vViewPosition = - mvPosition.xyz;
}`,IQ=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
vec3 viewDir = normalize( vViewPosition );
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
vec3 y = cross( viewDir, x );
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
#ifdef USE_MATCAP
vec4 matcapColor = texture2D( matcap, uv );
#else
vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
#endif
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,kQ=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
varying vec3 vViewPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
vViewPosition = - mvPosition.xyz;
#endif
}`,LQ=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
varying vec3 vViewPosition;
#endif
#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
#include <logdepthbuf_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
#ifdef OPAQUE
gl_FragColor.a = 1.0;
#endif
}`,DQ=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <envmap_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,FQ=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <specularmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_phong_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
#include <envmap_fragment>
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,jQ=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
varying vec3 vWorldPosition;
#endif
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
#ifdef USE_TRANSMISSION
vWorldPosition = worldPosition.xyz;
#endif
}`,OQ=`#define STANDARD
#ifdef PHYSICAL
#define IOR
#define USE_SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
uniform float ior;
#endif
#ifdef USE_SPECULAR
uniform float specularIntensity;
uniform vec3 specularColor;
#ifdef USE_SPECULAR_COLORMAP
uniform sampler2D specularColorMap;
#endif
#ifdef USE_SPECULAR_INTENSITYMAP
uniform sampler2D specularIntensityMap;
#endif
#endif
#ifdef USE_CLEARCOAT
uniform float clearcoat;
uniform float clearcoatRoughness;
#endif
#ifdef USE_IRIDESCENCE
uniform float iridescence;
uniform float iridescenceIOR;
uniform float iridescenceThicknessMinimum;
uniform float iridescenceThicknessMaximum;
#endif
#ifdef USE_SHEEN
uniform vec3 sheenColor;
uniform float sheenRoughness;
#ifdef USE_SHEEN_COLORMAP
uniform sampler2D sheenColorMap;
#endif
#ifdef USE_SHEEN_ROUGHNESSMAP
uniform sampler2D sheenRoughnessMap;
#endif
#endif
#ifdef USE_ANISOTROPY
uniform vec2 anisotropyVector;
#ifdef USE_ANISOTROPYMAP
uniform sampler2D anisotropyMap;
#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <iridescence_fragment>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <iridescence_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <roughnessmap_fragment>
#include <metalnessmap_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <clearcoat_normal_fragment_begin>
#include <clearcoat_normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_physical_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
#include <transmission_fragment>
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
#ifdef USE_SHEEN
float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
#endif
#ifdef USE_CLEARCOAT
float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
#endif
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,UQ=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <batching_pars_vertex>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
#include <color_vertex>
#include <morphcolor_vertex>
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <normal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <displacementmap_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
vViewPosition = - mvPosition.xyz;
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,zQ=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec4 diffuseColor = vec4( diffuse, opacity );
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
vec3 totalEmissiveRadiance = emissive;
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <color_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
#include <normal_fragment_begin>
#include <normal_fragment_maps>
#include <emissivemap_fragment>
#include <lights_toon_fragment>
#include <lights_fragment_begin>
#include <lights_fragment_maps>
#include <lights_fragment_end>
#include <aomap_fragment>
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
#include <dithering_fragment>
}`,BQ=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
#ifdef USE_POINTS_UV
varying vec2 vUv;
uniform mat3 uvTransform;
#endif
void main() {
#ifdef USE_POINTS_UV
vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif
#include <color_vertex>
#include <morphcolor_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <project_vertex>
gl_PointSize = size;
#ifdef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
#endif
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <worldpos_vertex>
#include <fog_vertex>
}`,VQ=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_particle_fragment>
#include <color_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
outgoingLight = diffuseColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
#include <premultiplied_alpha_fragment>
}`,HQ=`#include <common>
#include <batching_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
#include <batching_vertex>
#include <beginnormal_vertex>
#include <morphnormal_vertex>
#include <skinbase_vertex>
#include <skinnormal_vertex>
#include <defaultnormal_vertex>
#include <begin_vertex>
#include <morphtarget_vertex>
#include <skinning_vertex>
#include <project_vertex>
#include <logdepthbuf_vertex>
#include <worldpos_vertex>
#include <shadowmap_vertex>
#include <fog_vertex>
}`,WQ=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <logdepthbuf_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
#include <logdepthbuf_fragment>
gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
}`,GQ=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
#include <uv_vertex>
vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
vec2 scale;
scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
#ifndef USE_SIZEATTENUATION
bool isPerspective = isPerspectiveMatrix( projectionMatrix );
if ( isPerspective ) scale *= - mvPosition.z;
#endif
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
vec2 rotatedPosition;
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
mvPosition.xy += rotatedPosition;
gl_Position = projectionMatrix * mvPosition;
#include <logdepthbuf_vertex>
#include <clipping_planes_vertex>
#include <fog_vertex>
}`,qQ=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <alphahash_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
#include <clipping_planes_fragment>
vec3 outgoingLight = vec3( 0.0 );
vec4 diffuseColor = vec4( diffuse, opacity );
#include <logdepthbuf_fragment>
#include <map_fragment>
#include <alphamap_fragment>
#include <alphatest_fragment>
#include <alphahash_fragment>
outgoingLight = diffuseColor.rgb;
#include <opaque_fragment>
#include <tonemapping_fragment>
#include <colorspace_fragment>
#include <fog_fragment>
}`,Tt={alphahash_fragment:p$,alphahash_pars_fragment:m$,alphamap_fragment:g$,alphamap_pars_fragment:x$,alphatest_fragment:y$,alphatest_pars_fragment:v$,aomap_fragment:w$,aomap_pars_fragment:b$,batching_pars_vertex:_$,batching_vertex:S$,begin_vertex:A$,beginnormal_vertex:M$,bsdfs:T$,iridescence_fragment:E$,bumpmap_pars_fragment:C$,clipping_planes_fragment:P$,clipping_planes_pars_fragment:N$,clipping_planes_pars_vertex:R$,clipping_planes_vertex:I$,color_fragment:k$,color_pars_fragment:L$,color_pars_vertex:D$,color_vertex:F$,common:j$,cube_uv_reflection_fragment:O$,defaultnormal_vertex:U$,displacementmap_pars_vertex:z$,displacementmap_vertex:B$,emissivemap_fragment:V$,emissivemap_pars_fragment:H$,colorspace_fragment:W$,colorspace_pars_fragment:G$,envmap_fragment:q$,envmap_common_pars_fragment:X$,envmap_pars_fragment:$$,envmap_pars_vertex:Y$,envmap_physical_pars_fragment:oY,envmap_vertex:Q$,fog_vertex:K$,fog_pars_vertex:Z$,fog_fragment:J$,fog_pars_fragment:eY,gradientmap_pars_fragment:tY,lightmap_fragment:nY,lightmap_pars_fragment:iY,lights_lambert_fragment:rY,lights_lambert_pars_fragment:sY,lights_pars_begin:aY,lights_toon_fragment:lY,lights_toon_pars_fragment:cY,lights_phong_fragment:uY,lights_phong_pars_fragment:dY,lights_physical_fragment:hY,lights_physical_pars_fragment:fY,lights_fragment_begin:pY,lights_fragment_maps:mY,lights_fragment_end:gY,logdepthbuf_fragment:xY,logdepthbuf_pars_fragment:yY,logdepthbuf_pars_vertex:vY,logdepthbuf_vertex:wY,map_fragment:bY,map_pars_fragment:_Y,map_particle_fragment:SY,map_particle_pars_fragment:AY,metalnessmap_fragment:MY,metalnessmap_pars_fragment:TY,morphcolor_vertex:EY,morphnormal_vertex:CY,morphtarget_pars_vertex:PY,morphtarget_vertex:NY,normal_fragment_begin:RY,normal_fragment_maps:IY,normal_pars_fragment:kY,normal_pars_vertex:LY,normal_vertex:DY,normalmap_pars_fragment:FY,clearcoat_normal_fragment_begin:jY,clearcoat_normal_fragment_maps:OY,clearcoat_pars_fragment:UY,iridescence_pars_fragment:zY,opaque_fragment:BY,packing:VY,premultiplied_alpha_fragment:HY,project_vertex:WY,dithering_fragment:GY,dithering_pars_fragment:qY,roughnessmap_fragment:XY,roughnessmap_pars_fragment:$Y,shadowmap_pars_fragment:YY,shadowmap_pars_vertex:QY,shadowmap_vertex:KY,shadowmask_pars_fragment:ZY,skinbase_vertex:JY,skinning_pars_vertex:eQ,skinning_vertex:tQ,skinnormal_vertex:nQ,specularmap_fragment:iQ,specularmap_pars_fragment:rQ,tonemapping_fragment:sQ,tonemapping_pars_fragment:aQ,transmission_fragment:oQ,transmission_pars_fragment:lQ,uv_pars_fragment:cQ,uv_pars_vertex:uQ,uv_vertex:dQ,worldpos_vertex:hQ,background_vert:fQ,background_frag:pQ,backgroundCube_vert:mQ,backgroundCube_frag:gQ,cube_vert:xQ,cube_frag:yQ,depth_vert:vQ,depth_frag:wQ,distanceRGBA_vert:bQ,distanceRGBA_frag:_Q,equirect_vert:SQ,equirect_frag:AQ,linedashed_vert:MQ,linedashed_frag:TQ,meshbasic_vert:EQ,meshbasic_frag:CQ,meshlambert_vert:PQ,meshlambert_frag:NQ,meshmatcap_vert:RQ,meshmatcap_frag:IQ,meshnormal_vert:kQ,meshnormal_frag:LQ,meshphong_vert:DQ,meshphong_frag:FQ,meshphysical_vert:jQ,meshphysical_frag:OQ,meshtoon_vert:UQ,meshtoon_frag:zQ,points_vert:BQ,points_frag:VQ,shadow_vert:HQ,shadow_frag:WQ,sprite_vert:GQ,sprite_frag:qQ},ke={common:{diffuse:{value:new Ue(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Pt},alphaMap:{value:null},alphaMapTransform:{value:new Pt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Pt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Pt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Pt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Pt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Pt},normalScale:{value:new ye(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Pt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Pt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Pt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Pt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ue(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ue(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Pt},alphaTest:{value:0},uvTransform:{value:new Pt}},sprite:{diffuse:{value:new Ue(16777215)},opacity:{value:1},center:{value:new ye(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Pt},alphaMap:{value:null},alphaMapTransform:{value:new Pt},alphaTest:{value:0}}},us={basic:{uniforms:Fi([ke.common,ke.specularmap,ke.envmap,ke.aomap,ke.lightmap,ke.fog]),vertexShader:Tt.meshbasic_vert,fragmentShader:Tt.meshbasic_frag},lambert:{uniforms:Fi([ke.common,ke.specularmap,ke.envmap,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.fog,ke.lights,{emissive:{value:new Ue(0)}}]),vertexShader:Tt.meshlambert_vert,fragmentShader:Tt.meshlambert_frag},phong:{uniforms:Fi([ke.common,ke.specularmap,ke.envmap,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.fog,ke.lights,{emissive:{value:new Ue(0)},specular:{value:new Ue(1118481)},shininess:{value:30}}]),vertexShader:Tt.meshphong_vert,fragmentShader:Tt.meshphong_frag},standard:{uniforms:Fi([ke.common,ke.envmap,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.roughnessmap,ke.metalnessmap,ke.fog,ke.lights,{emissive:{value:new Ue(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag},toon:{uniforms:Fi([ke.common,ke.aomap,ke.lightmap,ke.emissivemap,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.gradientmap,ke.fog,ke.lights,{emissive:{value:new Ue(0)}}]),vertexShader:Tt.meshtoon_vert,fragmentShader:Tt.meshtoon_frag},matcap:{uniforms:Fi([ke.common,ke.bumpmap,ke.normalmap,ke.displacementmap,ke.fog,{matcap:{value:null}}]),vertexShader:Tt.meshmatcap_vert,fragmentShader:Tt.meshmatcap_frag},points:{uniforms:Fi([ke.points,ke.fog]),vertexShader:Tt.points_vert,fragmentShader:Tt.points_frag},dashed:{uniforms:Fi([ke.common,ke.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Tt.linedashed_vert,fragmentShader:Tt.linedashed_frag},depth:{uniforms:Fi([ke.common,ke.displacementmap]),vertexShader:Tt.depth_vert,fragmentShader:Tt.depth_frag},normal:{uniforms:Fi([ke.common,ke.bumpmap,ke.normalmap,ke.displacementmap,{opacity:{value:1}}]),vertexShader:Tt.meshnormal_vert,fragmentShader:Tt.meshnormal_frag},sprite:{uniforms:Fi([ke.sprite,ke.fog]),vertexShader:Tt.sprite_vert,fragmentShader:Tt.sprite_frag},background:{uniforms:{uvTransform:{value:new Pt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Tt.background_vert,fragmentShader:Tt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Tt.backgroundCube_vert,fragmentShader:Tt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Tt.cube_vert,fragmentShader:Tt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Tt.equirect_vert,fragmentShader:Tt.equirect_frag},distanceRGBA:{uniforms:Fi([ke.common,ke.displacementmap,{referencePosition:{value:new H},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Tt.distanceRGBA_vert,fragmentShader:Tt.distanceRGBA_frag},shadow:{uniforms:Fi([ke.lights,ke.fog,{color:{value:new Ue(0)},opacity:{value:1}}]),vertexShader:Tt.shadow_vert,fragmentShader:Tt.shadow_frag}};us.physical={uniforms:Fi([us.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Pt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Pt},clearcoatNormalScale:{value:new ye(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Pt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Pt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Pt},sheen:{value:0},sheenColor:{value:new Ue(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Pt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Pt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Pt},transmissionSamplerSize:{value:new ye},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Pt},attenuationDistance:{value:0},attenuationColor:{value:new Ue(0)},specularColor:{value:new Ue(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Pt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Pt},anisotropyVector:{value:new ye},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Pt}}]),vertexShader:Tt.meshphysical_vert,fragmentShader:Tt.meshphysical_frag};const ig={r:0,b:0,g:0};function XQ(t,e,n,i,r,s,a){const o=new Ue(0);let c=s===!0?0:1,u,f,p=null,m=0,g=null;function y(w,x){let _=!1,S=x.isScene===!0?x.background:null;S&&S.isTexture&&(S=(x.backgroundBlurriness>0?n:e).get(S)),S===null?b(o,c):S&&S.isColor&&(b(S,1),_=!0);const M=t.xr.getEnvironmentBlendMode();M==="additive"?i.buffers.color.setClear(0,0,0,1,a):M==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,a),(t.autoClear||_)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),S&&(S.isCubeTexture||S.mapping===yd)?(f===void 0&&(f=new $n(new uc(1,1,1),new Qs({name:"BackgroundCubeMaterial",uniforms:rd(us.backgroundCube.uniforms),vertexShader:us.backgroundCube.vertexShader,fragmentShader:us.backgroundCube.fragmentShader,side:Vi,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),f.geometry.deleteAttribute("uv"),f.onBeforeRender=function(E,C,N){this.matrixWorld.copyPosition(N.matrixWorld)},Object.defineProperty(f.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(f)),f.material.uniforms.envMap.value=S,f.material.uniforms.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,f.material.uniforms.backgroundBlurriness.value=x.backgroundBlurriness,f.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,f.material.toneMapped=$t.getTransfer(S.colorSpace)!==en,(p!==S||m!==S.version||g!==t.toneMapping)&&(f.material.needsUpdate=!0,p=S,m=S.version,g=t.toneMapping),f.layers.enableAll(),w.unshift(f,f.geometry,f.material,0,0,null)):S&&S.isTexture&&(u===void 0&&(u=new $n(new lp(2,2),new Qs({name:"BackgroundMaterial",uniforms:rd(us.background.uniforms),vertexShader:us.background.vertexShader,fragmentShader:us.background.fragmentShader,side:ka,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=S,u.material.uniforms.backgroundIntensity.value=x.backgroundIntensity,u.material.toneMapped=$t.getTransfer(S.colorSpace)!==en,S.matrixAutoUpdate===!0&&S.updateMatrix(),u.material.uniforms.uvTransform.value.copy(S.matrix),(p!==S||m!==S.version||g!==t.toneMapping)&&(u.material.needsUpdate=!0,p=S,m=S.version,g=t.toneMapping),u.layers.enableAll(),w.unshift(u,u.geometry,u.material,0,0,null))}function b(w,x){w.getRGB(ig,sj(t)),i.buffers.color.setClear(ig.r,ig.g,ig.b,x,a)}return{getClearColor:function(){return o},setClearColor:function(w,x=1){o.set(w),c=x,b(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(w){c=w,b(o,c)},render:y}}function $Q(t,e,n,i){const r=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),a=i.isWebGL2||s!==null,o={},c=w(null);let u=c,f=!1;function p(z,$,X,ee,L){let j=!1;if(a){const B=b(ee,X,$);u!==B&&(u=B,g(u.object)),j=x(z,ee,X,L),j&&_(z,ee,X,L)}else{const B=$.wireframe===!0;(u.geometry!==ee.id||u.program!==X.id||u.wireframe!==B)&&(u.geometry=ee.id,u.program=X.id,u.wireframe=B,j=!0)}L!==null&&n.update(L,t.ELEMENT_ARRAY_BUFFER),(j||f)&&(f=!1,D(z,$,X,ee),L!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,n.get(L).buffer))}function m(){return i.isWebGL2?t.createVertexArray():s.createVertexArrayOES()}function g(z){return i.isWebGL2?t.bindVertexArray(z):s.bindVertexArrayOES(z)}function y(z){return i.isWebGL2?t.deleteVertexArray(z):s.deleteVertexArrayOES(z)}function b(z,$,X){const ee=X.wireframe===!0;let L=o[z.id];L===void 0&&(L={},o[z.id]=L);let j=L[$.id];j===void 0&&(j={},L[$.id]=j);let B=j[ee];return B===void 0&&(B=w(m()),j[ee]=B),B}function w(z){const $=[],X=[],ee=[];for(let L=0;L<r;L++)$[L]=0,X[L]=0,ee[L]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:$,enabledAttributes:X,attributeDivisors:ee,object:z,attributes:{},index:null}}function x(z,$,X,ee){const L=u.attributes,j=$.attributes;let B=0;const Y=X.getAttributes();for(const Z in Y)if(Y[Z].location>=0){const se=L[Z];let ge=j[Z];if(ge===void 0&&(Z==="instanceMatrix"&&z.instanceMatrix&&(ge=z.instanceMatrix),Z==="instanceColor"&&z.instanceColor&&(ge=z.instanceColor)),se===void 0||se.attribute!==ge||ge&&se.data!==ge.data)return!0;B++}return u.attributesNum!==B||u.index!==ee}function _(z,$,X,ee){const L={},j=$.attributes;let B=0;const Y=X.getAttributes();for(const Z in Y)if(Y[Z].location>=0){let se=j[Z];se===void 0&&(Z==="instanceMatrix"&&z.instanceMatrix&&(se=z.instanceMatrix),Z==="instanceColor"&&z.instanceColor&&(se=z.instanceColor));const ge={};ge.attribute=se,se&&se.data&&(ge.data=se.data),L[Z]=ge,B++}u.attributes=L,u.attributesNum=B,u.index=ee}function S(){const z=u.newAttributes;for(let $=0,X=z.length;$<X;$++)z[$]=0}function M(z){E(z,0)}function E(z,$){const X=u.newAttributes,ee=u.enabledAttributes,L=u.attributeDivisors;X[z]=1,ee[z]===0&&(t.enableVertexAttribArray(z),ee[z]=1),L[z]!==$&&((i.isWebGL2?t:e.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](z,$),L[z]=$)}function C(){const z=u.newAttributes,$=u.enabledAttributes;for(let X=0,ee=$.length;X<ee;X++)$[X]!==z[X]&&(t.disableVertexAttribArray(X),$[X]=0)}function N(z,$,X,ee,L,j,B){B===!0?t.vertexAttribIPointer(z,$,X,L,j):t.vertexAttribPointer(z,$,X,ee,L,j)}function D(z,$,X,ee){if(i.isWebGL2===!1&&(z.isInstancedMesh||ee.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;S();const L=ee.attributes,j=X.getAttributes(),B=$.defaultAttributeValues;for(const Y in j){const Z=j[Y];if(Z.location>=0){let K=L[Y];if(K===void 0&&(Y==="instanceMatrix"&&z.instanceMatrix&&(K=z.instanceMatrix),Y==="instanceColor"&&z.instanceColor&&(K=z.instanceColor)),K!==void 0){const se=K.normalized,ge=K.itemSize,Ce=n.get(K);if(Ce===void 0)continue;const xe=Ce.buffer,nt=Ce.type,it=Ce.bytesPerElement,ze=i.isWebGL2===!0&&(nt===t.INT||nt===t.UNSIGNED_INT||K.gpuType===NA);if(K.isInterleavedBufferAttribute){const Xe=K.data,q=Xe.stride,_e=K.offset;if(Xe.isInstancedInterleavedBuffer){for(let fe=0;fe<Z.locationSize;fe++)E(Z.location+fe,Xe.meshPerAttribute);z.isInstancedMesh!==!0&&ee._maxInstanceCount===void 0&&(ee._maxInstanceCount=Xe.meshPerAttribute*Xe.count)}else for(let fe=0;fe<Z.locationSize;fe++)M(Z.location+fe);t.bindBuffer(t.ARRAY_BUFFER,xe);for(let fe=0;fe<Z.locationSize;fe++)N(Z.location+fe,ge/Z.locationSize,nt,se,q*it,(_e+ge/Z.locationSize*fe)*it,ze)}else{if(K.isInstancedBufferAttribute){for(let Xe=0;Xe<Z.locationSize;Xe++)E(Z.location+Xe,K.meshPerAttribute);z.isInstancedMesh!==!0&&ee._maxInstanceCount===void 0&&(ee._maxInstanceCount=K.meshPerAttribute*K.count)}else for(let Xe=0;Xe<Z.locationSize;Xe++)M(Z.location+Xe);t.bindBuffer(t.ARRAY_BUFFER,xe);for(let Xe=0;Xe<Z.locationSize;Xe++)N(Z.location+Xe,ge/Z.locationSize,nt,se,ge*it,ge/Z.locationSize*Xe*it,ze)}}else if(B!==void 0){const se=B[Y];if(se!==void 0)switch(se.length){case 2:t.vertexAttrib2fv(Z.location,se);break;case 3:t.vertexAttrib3fv(Z.location,se);break;case 4:t.vertexAttrib4fv(Z.location,se);break;default:t.vertexAttrib1fv(Z.location,se)}}}}C()}function R(){G();for(const z in o){const $=o[z];for(const X in $){const ee=$[X];for(const L in ee)y(ee[L].object),delete ee[L];delete $[X]}delete o[z]}}function k(z){if(o[z.id]===void 0)return;const $=o[z.id];for(const X in $){const ee=$[X];for(const L in ee)y(ee[L].object),delete ee[L];delete $[X]}delete o[z.id]}function V(z){for(const $ in o){const X=o[$];if(X[z.id]===void 0)continue;const ee=X[z.id];for(const L in ee)y(ee[L].object),delete ee[L];delete X[z.id]}}function G(){ie(),f=!0,u!==c&&(u=c,g(u.object))}function ie(){c.geometry=null,c.program=null,c.wireframe=!1}return{setup:p,reset:G,resetDefaultState:ie,dispose:R,releaseStatesOfGeometry:k,releaseStatesOfProgram:V,initAttributes:S,enableAttribute:M,disableUnusedAttributes:C}}function YQ(t,e,n,i){const r=i.isWebGL2;let s;function a(f){s=f}function o(f,p){t.drawArrays(s,f,p),n.update(p,s,1)}function c(f,p,m){if(m===0)return;let g,y;if(r)g=t,y="drawArraysInstanced";else if(g=e.get("ANGLE_instanced_arrays"),y="drawArraysInstancedANGLE",g===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}g[y](s,f,p,m),n.update(p,s,m)}function u(f,p,m){if(m===0)return;const g=e.get("WEBGL_multi_draw");if(g===null)for(let y=0;y<m;y++)this.render(f[y],p[y]);else{g.multiDrawArraysWEBGL(s,f,0,p,0,m);let y=0;for(let b=0;b<m;b++)y+=p[b];n.update(y,s,1)}}this.setMode=a,this.render=o,this.renderInstances=c,this.renderMultiDraw=u}function QQ(t,e,n){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const N=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(N.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(N){if(N==="highp"){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";N="mediump"}return N==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a=typeof WebGL2RenderingContext<"u"&&t.constructor.name==="WebGL2RenderingContext";let o=n.precision!==void 0?n.precision:"highp";const c=s(o);c!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",c,"instead."),o=c);const u=a||e.has("WEBGL_draw_buffers"),f=n.logarithmicDepthBuffer===!0,p=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),g=t.getParameter(t.MAX_TEXTURE_SIZE),y=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),b=t.getParameter(t.MAX_VERTEX_ATTRIBS),w=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),x=t.getParameter(t.MAX_VARYING_VECTORS),_=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),S=m>0,M=a||e.has("OES_texture_float"),E=S&&M,C=a?t.getParameter(t.MAX_SAMPLES):0;return{isWebGL2:a,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:s,precision:o,logarithmicDepthBuffer:f,maxTextures:p,maxVertexTextures:m,maxTextureSize:g,maxCubemapSize:y,maxAttributes:b,maxVertexUniforms:w,maxVaryings:x,maxFragmentUniforms:_,vertexTextures:S,floatFragmentTextures:M,floatVertexTextures:E,maxSamples:C}}function KQ(t){const e=this;let n=null,i=0,r=!1,s=!1;const a=new lo,o=new Pt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(p,m){const g=p.length!==0||m||i!==0||r;return r=m,i=p.length,g},this.beginShadows=function(){s=!0,f(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(p,m){n=f(p,m,0)},this.setState=function(p,m,g){const y=p.clippingPlanes,b=p.clipIntersection,w=p.clipShadows,x=t.get(p);if(!r||y===null||y.length===0||s&&!w)s?f(null):u();else{const _=s?0:i,S=_*4;let M=x.clippingState||null;c.value=M,M=f(y,m,S,g);for(let E=0;E!==S;++E)M[E]=n[E];x.clippingState=M,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=_}};function u(){c.value!==n&&(c.value=n,c.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function f(p,m,g,y){const b=p!==null?p.length:0;let w=null;if(b!==0){if(w=c.value,y!==!0||w===null){const x=g+b*4,_=m.matrixWorldInverse;o.getNormalMatrix(_),(w===null||w.length<x)&&(w=new Float32Array(x));for(let S=0,M=g;S!==b;++S,M+=4)a.copy(p[S]).applyMatrix4(_,o),a.normal.toArray(w,M),w[M+3]=a.constant}c.value=w,c.needsUpdate=!0}return e.numPlanes=b,e.numIntersection=0,w}}function ZQ(t){let e=new WeakMap;function n(a,o){return o===vf?a.mapping=La:o===wf&&(a.mapping=zo),a}function i(a){if(a&&a.isTexture){const o=a.mapping;if(o===vf||o===wf)if(e.has(a)){const c=e.get(a).texture;return n(c,a.mapping)}else{const c=a.image;if(c&&c.height>0){const u=new lj(c.height/2);return u.fromEquirectangularTexture(t,a),e.set(a,u),a.addEventListener("dispose",r),n(u.texture,a.mapping)}else return null}}return a}function r(a){const o=a.target;o.removeEventListener("dispose",r);const c=e.get(o);c!==void 0&&(e.delete(o),c.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class cp extends sp{constructor(e=-1,n=1,i=1,r=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=r,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,i,r,s,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,a=i+e,o=r+n,c=r-n;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,f=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,a=s+u*this.view.width,o-=f*this.view.offsetY,c=o-f*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,c,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}const bu=4,IP=[.125,.215,.35,.446,.526,.582],Ml=20,Rw=new cp,kP=new Ue;let Iw=null,kw=0,Lw=0;const Al=(1+Math.sqrt(5))/2,qc=1/Al,LP=[new H(1,1,1),new H(-1,1,1),new H(1,1,-1),new H(-1,1,-1),new H(0,Al,qc),new H(0,Al,-qc),new H(qc,0,Al),new H(-qc,0,Al),new H(Al,qc,0),new H(-Al,qc,0)];class y_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,r=100){Iw=this._renderer.getRenderTarget(),kw=this._renderer.getActiveCubeFace(),Lw=this._renderer.getActiveMipmapLevel(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),n>0&&this._blur(s,0,0,n),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=jP(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=FP(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Iw,kw,Lw),e.scissorTest=!1,rg(e,0,0,e.width,e.height)}_fromTexture(e,n){e.mapping===La||e.mapping===zo?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Iw=this._renderer.getRenderTarget(),kw=this._renderer.getActiveCubeFace(),Lw=this._renderer.getActiveMipmapLevel();const i=n||this._allocateTargets();return this._textureToCubeUV(e,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),n=4*this._cubeSize,i={magFilter:jn,minFilter:jn,generateMipmaps:!1,type:td,format:zi,colorSpace:Ys,depthBuffer:!1},r=DP(e,n,i);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==n){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=DP(e,n,i);const{_lodMax:s}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=JQ(s)),this._blurMaterial=eK(s,e,n)}return r}_compileMaterial(e){const n=new $n(this._lodPlanes[0],e);this._renderer.compile(n,Rw)}_sceneToCubeUV(e,n,i,r){const o=new si(90,1,n,i),c=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],f=this._renderer,p=f.autoClear,m=f.toneMapping;f.getClearColor(kP),f.toneMapping=Ws,f.autoClear=!1;const g=new Qo({name:"PMREM.Background",side:Vi,depthWrite:!1,depthTest:!1}),y=new $n(new uc,g);let b=!1;const w=e.background;w?w.isColor&&(g.color.copy(w),e.background=null,b=!0):(g.color.copy(kP),b=!0);for(let x=0;x<6;x++){const _=x%3;_===0?(o.up.set(0,c[x],0),o.lookAt(u[x],0,0)):_===1?(o.up.set(0,0,c[x]),o.lookAt(0,u[x],0)):(o.up.set(0,c[x],0),o.lookAt(0,0,u[x]));const S=this._cubeSize;rg(r,_*S,x>2?S:0,S,S),f.setRenderTarget(r),b&&f.render(y,o),f.render(e,o)}y.geometry.dispose(),y.material.dispose(),f.toneMapping=m,f.autoClear=p,e.background=w}_textureToCubeUV(e,n){const i=this._renderer,r=e.mapping===La||e.mapping===zo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=jP()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=FP());const s=r?this._cubemapMaterial:this._equirectMaterial,a=new $n(this._lodPlanes[0],s),o=s.uniforms;o.envMap.value=e;const c=this._cubeSize;rg(n,0,0,3*c,2*c),i.setRenderTarget(n),i.render(a,Rw)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;for(let r=1;r<this._lodPlanes.length;r++){const s=Math.sqrt(this._sigmas[r]*this._sigmas[r]-this._sigmas[r-1]*this._sigmas[r-1]),a=LP[(r-1)%LP.length];this._blur(e,r-1,r,s,a)}n.autoClear=i}_blur(e,n,i,r,s){const a=this._pingPongRenderTarget;this._halfBlur(e,a,n,i,r,"latitudinal",s),this._halfBlur(a,e,i,i,r,"longitudinal",s)}_halfBlur(e,n,i,r,s,a,o){const c=this._renderer,u=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const f=3,p=new $n(this._lodPlanes[r],u),m=u.uniforms,g=this._sizeLods[i]-1,y=isFinite(s)?Math.PI/(2*g):2*Math.PI/(2*Ml-1),b=s/y,w=isFinite(s)?1+Math.floor(f*b):Ml;w>Ml&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${w} samples when the maximum is set to ${Ml}`);const x=[];let _=0;for(let N=0;N<Ml;++N){const D=N/b,R=Math.exp(-D*D/2);x.push(R),N===0?_+=R:N<w&&(_+=2*R)}for(let N=0;N<x.length;N++)x[N]=x[N]/_;m.envMap.value=e.texture,m.samples.value=w,m.weights.value=x,m.latitudinal.value=a==="latitudinal",o&&(m.poleAxis.value=o);const{_lodMax:S}=this;m.dTheta.value=y,m.mipInt.value=S-i;const M=this._sizeLods[r],E=3*M*(r>S-bu?r-S+bu:0),C=4*(this._cubeSize-M);rg(n,E,C,3*M,2*M),c.setRenderTarget(n),c.render(p,Rw)}}function JQ(t){const e=[],n=[],i=[];let r=t;const s=t-bu+1+IP.length;for(let a=0;a<s;a++){const o=Math.pow(2,r);n.push(o);let c=1/o;a>t-bu?c=IP[a-t+bu-1]:a===0&&(c=0),i.push(c);const u=1/(o-2),f=-u,p=1+u,m=[f,f,p,f,p,p,f,f,p,p,f,p],g=6,y=6,b=3,w=2,x=1,_=new Float32Array(b*y*g),S=new Float32Array(w*y*g),M=new Float32Array(x*y*g);for(let C=0;C<g;C++){const N=C%3*2/3-1,D=C>2?0:-1,R=[N,D,0,N+2/3,D,0,N+2/3,D+1,0,N,D,0,N+2/3,D+1,0,N,D+1,0];_.set(R,b*y*C),S.set(m,w*y*C);const k=[C,C,C,C,C,C];M.set(k,x*y*C)}const E=new At;E.setAttribute("position",new qt(_,b)),E.setAttribute("uv",new qt(S,w)),E.setAttribute("faceIndex",new qt(M,x)),e.push(E),r>bu&&r--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function DP(t,e,n){const i=new ys(t,e,n);return i.texture.mapping=yd,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function rg(t,e,n,i,r){t.viewport.set(e,n,i,r),t.scissor.set(e,n,i,r)}function eK(t,e,n){const i=new Float32Array(Ml),r=new H(0,1,0);return new Qs({name:"SphericalGaussianBlur",defines:{n:Ml,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:GA(),fragmentShader:`
precision mediump float;
precision mediump int;
varying vec3 vOutputDirection;
uniform sampler2D envMap;
uniform int samples;
uniform float weights[ n ];
uniform bool latitudinal;
uniform float dTheta;
uniform float mipInt;
uniform vec3 poleAxis;
#define ENVMAP_TYPE_CUBE_UV
#include <cube_uv_reflection_fragment>
vec3 getSample( float theta, vec3 axis ) {
float cosTheta = cos( theta );
// Rodrigues' axis-angle rotation
vec3 sampleDirection = vOutputDirection * cosTheta
+ cross( axis, vOutputDirection ) * sin( theta )
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
return bilinearCubeUV( envMap, sampleDirection, mipInt );
}
void main() {
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
}
axis = normalize( axis );
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
for ( int i = 1; i < n; i++ ) {
if ( i >= samples ) {
break;
}
float theta = dTheta * float( i );
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
}
}
`,blending:Ma,depthTest:!1,depthWrite:!1})}function FP(){return new Qs({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:GA(),fragmentShader:`
precision mediump float;
precision mediump int;
varying vec3 vOutputDirection;
uniform sampler2D envMap;
#include <common>
void main() {
vec3 outputDirection = normalize( vOutputDirection );
vec2 uv = equirectUv( outputDirection );
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
}
`,blending:Ma,depthTest:!1,depthWrite:!1})}function jP(){return new Qs({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:GA(),fragmentShader:`
precision mediump float;
precision mediump int;
uniform float flipEnvMap;
varying vec3 vOutputDirection;
uniform samplerCube envMap;
void main() {
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
}
`,blending:Ma,depthTest:!1,depthWrite:!1})}function GA(){return`
precision mediump float;
precision mediump int;
attribute float faceIndex;
varying vec3 vOutputDirection;
// RH coordinate system; PMREM face-indexing convention
vec3 getDirection( vec2 uv, float face ) {
uv = 2.0 * uv - 1.0;
vec3 direction = vec3( uv, 1.0 );
if ( face == 0.0 ) {
direction = direction.zyx; // ( 1, v, u ) pos x
} else if ( face == 1.0 ) {
direction = direction.xzy;
direction.xz *= -1.0; // ( -u, 1, -v ) pos y
} else if ( face == 2.0 ) {
direction.x *= -1.0; // ( -u, v, 1 ) pos z
} else if ( face == 3.0 ) {
direction = direction.zyx;
direction.xz *= -1.0; // ( -1, v, -u ) neg x
} else if ( face == 4.0 ) {
direction = direction.xzy;
direction.xy *= -1.0; // ( -u, -1, v ) neg y
} else if ( face == 5.0 ) {
direction.z *= -1.0; // ( u, v, -1 ) neg z
}
return direction;
}
void main() {
vOutputDirection = getDirection( uv, faceIndex );
gl_Position = vec4( position, 1.0 );
}
`}function tK(t){let e=new WeakMap,n=null;function i(o){if(o&&o.isTexture){const c=o.mapping,u=c===vf||c===wf,f=c===La||c===zo;if(u||f)if(o.isRenderTargetTexture&&o.needsPMREMUpdate===!0){o.needsPMREMUpdate=!1;let p=e.get(o);return n===null&&(n=new y_(t)),p=u?n.fromEquirectangular(o,p):n.fromCubemap(o,p),e.set(o,p),p.texture}else{if(e.has(o))return e.get(o).texture;{const p=o.image;if(u&&p&&p.height>0||f&&p&&r(p)){n===null&&(n=new y_(t));const m=u?n.fromEquirectangular(o):n.fromCubemap(o);return e.set(o,m),o.addEventListener("dispose",s),m.texture}else return null}}}return o}function r(o){let c=0;const u=6;for(let f=0;f<u;f++)o[f]!==void 0&&c++;return c===u}function s(o){const c=o.target;c.removeEventListener("dispose",s);const u=e.get(c);u!==void 0&&(e.delete(c),u.dispose())}function a(){e=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:i,dispose:a}}function nK(t){const e={};function n(i){if(e[i]!==void 0)return e[i];let r;switch(i){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(i)}return e[i]=r,r}return{has:function(i){return n(i)!==null},init:function(i){i.isWebGL2?(n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance")):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(i){const r=n(i);return r===null&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function iK(t,e,n,i){const r={},s=new WeakMap;function a(p){const m=p.target;m.index!==null&&e.remove(m.index);for(const y in m.attributes)e.remove(m.attributes[y]);for(const y in m.morphAttributes){const b=m.morphAttributes[y];for(let w=0,x=b.length;w<x;w++)e.remove(b[w])}m.removeEventListener("dispose",a),delete r[m.id];const g=s.get(m);g&&(e.remove(g),s.delete(m)),i.releaseStatesOfGeometry(m),m.isInstancedBufferGeometry===!0&&delete m._maxInstanceCount,n.memory.geometries--}function o(p,m){return r[m.id]===!0||(m.addEventListener("dispose",a),r[m.id]=!0,n.memory.geometries++),m}function c(p){const m=p.attributes;for(const y in m)e.update(m[y],t.ARRAY_BUFFER);const g=p.morphAttributes;for(const y in g){const b=g[y];for(let w=0,x=b.length;w<x;w++)e.update(b[w],t.ARRAY_BUFFER)}}function u(p){const m=[],g=p.index,y=p.attributes.position;let b=0;if(g!==null){const _=g.array;b=g.version;for(let S=0,M=_.length;S<M;S+=3){const E=_[S+0],C=_[S+1],N=_[S+2];m.push(E,C,C,N,N,E)}}else if(y!==void 0){const _=y.array;b=y.version;for(let S=0,M=_.length/3-1;S<M;S+=3){const E=S+0,C=S+1,N=S+2;m.push(E,C,C,N,N,E)}}else return;const w=new(tj(m)?WA:HA)(m,1);w.version=b;const x=s.get(p);x&&e.remove(x),s.set(p,w)}function f(p){const m=s.get(p);if(m){const g=p.index;g!==null&&m.version<g.version&&u(p)}else u(p);return s.get(p)}return{get:o,update:c,getWireframeAttribute:f}}function rK(t,e,n,i){const r=i.isWebGL2;let s;function a(g){s=g}let o,c;function u(g){o=g.type,c=g.bytesPerElement}function f(g,y){t.drawElements(s,y,o,g*c),n.update(y,s,1)}function p(g,y,b){if(b===0)return;let w,x;if(r)w=t,x="drawElementsInstanced";else if(w=e.get("ANGLE_instanced_arrays"),x="drawElementsInstancedANGLE",w===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}w[x](s,y,o,g*c,b),n.update(y,s,b)}function m(g,y,b){if(b===0)return;const w=e.get("WEBGL_multi_draw");if(w===null)for(let x=0;x<b;x++)this.render(g[x]/c,y[x]);else{w.multiDrawElementsWEBGL(s,y,0,o,g,0,b);let x=0;for(let _=0;_<b;_++)x+=y[_];n.update(x,s,1)}}this.setMode=a,this.setIndex=u,this.render=f,this.renderInstances=p,this.renderMultiDraw=m}function sK(t){const e={geometries:0,textures:0},n={frame:0,calls:0,triangles:0,points:0,lines:0};function i(s,a,o){switch(n.calls++,a){case t.TRIANGLES:n.triangles+=o*(s/3);break;case t.LINES:n.lines+=o*(s/2);break;case t.LINE_STRIP:n.lines+=o*(s-1);break;case t.LINE_LOOP:n.lines+=o*s;break;case t.POINTS:n.points+=o*s;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",a);break}}function r(){n.calls=0,n.triangles=0,n.points=0,n.lines=0}return{memory:e,render:n,programs:null,autoReset:!0,reset:r,update:i}}function aK(t,e){return t[0]-e[0]}function oK(t,e){return Math.abs(e[1])-Math.abs(t[1])}function lK(t,e,n){const i={},r=new Float32Array(8),s=new WeakMap,a=new Yt,o=[];for(let u=0;u<8;u++)o[u]=[u,0];function c(u,f,p){const m=u.morphTargetInfluences;if(e.isWebGL2===!0){const y=f.morphAttributes.position||f.morphAttributes.normal||f.morphAttributes.color,b=y!==void 0?y.length:0;let w=s.get(f);if(w===void 0||w.count!==b){let $=function(){ie.dispose(),s.delete(f),f.removeEventListener("dispose",$)};var g=$;w!==void 0&&w.texture.dispose();const S=f.morphAttributes.position!==void 0,M=f.morphAttributes.normal!==void 0,E=f.morphAttributes.color!==void 0,C=f.morphAttributes.position||[],N=f.morphAttributes.normal||[],D=f.morphAttributes.color||[];let R=0;S===!0&&(R=1),M===!0&&(R=2),E===!0&&(R=3);let k=f.attributes.position.count*R,V=1;k>e.maxTextureSize&&(V=Math.ceil(k/e.maxTextureSize),k=e.maxTextureSize);const G=new Float32Array(k*V*4*b),ie=new zy(G,k,V,b);ie.type=ds,ie.needsUpdate=!0;const z=R*4;for(let X=0;X<b;X++){const ee=C[X],L=N[X],j=D[X],B=k*V*4*X;for(let Y=0;Y<ee.count;Y++){const Z=Y*z;S===!0&&(a.fromBufferAttribute(ee,Y),G[B+Z+0]=a.x,G[B+Z+1]=a.y,G[B+Z+2]=a.z,G[B+Z+3]=0),M===!0&&(a.fromBufferAttribute(L,Y),G[B+Z+4]=a.x,G[B+Z+5]=a.y,G[B+Z+6]=a.z,G[B+Z+7]=0),E===!0&&(a.fromBufferAttribute(j,Y),G[B+Z+8]=a.x,G[B+Z+9]=a.y,G[B+Z+10]=a.z,G[B+Z+11]=j.itemSize===4?a.w:1)}}w={count:b,texture:ie,size:new ye(k,V)},s.set(f,w),f.addEventListener("dispose",$)}let x=0;for(let S=0;S<m.length;S++)x+=m[S];const _=f.morphTargetsRelative?1:1-x;p.getUniforms().setValue(t,"morphTargetBaseInfluence",_),p.getUniforms().setValue(t,"morphTargetInfluences",m),p.getUniforms().setValue(t,"morphTargetsTexture",w.texture,n),p.getUniforms().setValue(t,"morphTargetsTextureSize",w.size)}else{const y=m===void 0?0:m.length;let b=i[f.id];if(b===void 0||b.length!==y){b=[];for(let M=0;M<y;M++)b[M]=[M,0];i[f.id]=b}for(let M=0;M<y;M++){const E=b[M];E[0]=M,E[1]=m[M]}b.sort(oK);for(let M=0;M<8;M++)M<y&&b[M][1]?(o[M][0]=b[M][0],o[M][1]=b[M][1]):(o[M][0]=Number.MAX_SAFE_INTEGER,o[M][1]=0);o.sort(aK);const w=f.morphAttributes.position,x=f.morphAttributes.normal;let _=0;for(let M=0;M<8;M++){const E=o[M],C=E[0],N=E[1];C!==Number.MAX_SAFE_INTEGER&&N?(w&&f.getAttribute("morphTarget"+M)!==w[C]&&f.setAttribute("morphTarget"+M,w[C]),x&&f.getAttribute("morphNormal"+M)!==x[C]&&f.setAttribute("morphNormal"+M,x[C]),r[M]=N,_+=N):(w&&f.hasAttribute("morphTarget"+M)===!0&&f.deleteAttribute("morphTarget"+M),x&&f.hasAttribute("morphNormal"+M)===!0&&f.deleteAttribute("morphNormal"+M),r[M]=0)}const S=f.morphTargetsRelative?1:1-_;p.getUniforms().setValue(t,"morphTargetBaseInfluence",S),p.getUniforms().setValue(t,"morphTargetInfluences",r)}}return{update:c}}function cK(t,e,n,i){let r=new WeakMap;function s(c){const u=i.render.frame,f=c.geometry,p=e.get(c,f);if(r.get(p)!==u&&(e.update(p),r.set(p,u)),c.isInstancedMesh&&(c.hasEventListener("dispose",o)===!1&&c.addEventListener("dispose",o),r.get(c)!==u&&(n.update(c.instanceMatrix,t.ARRAY_BUFFER),c.instanceColor!==null&&n.update(c.instanceColor,t.ARRAY_BUFFER),r.set(c,u))),c.isSkinnedMesh){const m=c.skeleton;r.get(m)!==u&&(m.update(),r.set(m,u))}return p}function a(){r=new WeakMap}function o(c){const u=c.target;u.removeEventListener("dispose",o),n.remove(u.instanceMatrix),u.instanceColor!==null&&n.remove(u.instanceColor)}return{update:s,dispose:a}}class qA extends Un{constructor(e,n,i,r,s,a,o,c,u,f){if(f=f!==void 0?f:Ro,f!==Ro&&f!==rc)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&f===Ro&&(i=wa),i===void 0&&f===rc&&(i=No),super(null,r,s,a,o,c,f,i,u),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=o!==void 0?o:Ln,this.minFilter=c!==void 0?c:Ln,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}const uj=new Un,dj=new qA(1,1);dj.compareFunction=UA;const hj=new zy,fj=new VA,pj=new ap,OP=[],UP=[],zP=new Float32Array(16),BP=new Float32Array(9),VP=new Float32Array(4);function wd(t,e,n){const i=t[0];if(i<=0||i>0)return t;const r=e*n;let s=OP[r];if(s===void 0&&(s=new Float32Array(r),OP[r]=s),e!==0){i.toArray(s,0);for(let a=1,o=0;a!==e;++a)o+=n,t[a].toArray(s,o)}return s}function Yn(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function Qn(t,e){for(let n=0,i=e.length;n<i;n++)t[n]=e[n]}function By(t,e){let n=UP[e];n===void 0&&(n=new Int32Array(e),UP[e]=n);for(let i=0;i!==e;++i)n[i]=t.allocateTextureUnit();return n}function uK(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function dK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Yn(n,e))return;t.uniform2fv(this.addr,e),Qn(n,e)}}function hK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(e.r!==void 0)(n[0]!==e.r||n[1]!==e.g||n[2]!==e.b)&&(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Yn(n,e))return;t.uniform3fv(this.addr,e),Qn(n,e)}}function fK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Yn(n,e))return;t.uniform4fv(this.addr,e),Qn(n,e)}}function pK(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(Yn(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Qn(n,e)}else{if(Yn(n,i))return;VP.set(i),t.uniformMatrix2fv(this.addr,!1,VP),Qn(n,i)}}function mK(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(Yn(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Qn(n,e)}else{if(Yn(n,i))return;BP.set(i),t.uniformMatrix3fv(this.addr,!1,BP),Qn(n,i)}}function gK(t,e){const n=this.cache,i=e.elements;if(i===void 0){if(Yn(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Qn(n,e)}else{if(Yn(n,i))return;zP.set(i),t.uniformMatrix4fv(this.addr,!1,zP),Qn(n,i)}}function xK(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function yK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Yn(n,e))return;t.uniform2iv(this.addr,e),Qn(n,e)}}function vK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Yn(n,e))return;t.uniform3iv(this.addr,e),Qn(n,e)}}function wK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Yn(n,e))return;t.uniform4iv(this.addr,e),Qn(n,e)}}function bK(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function _K(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y)&&(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Yn(n,e))return;t.uniform2uiv(this.addr,e),Qn(n,e)}}function SK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z)&&(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Yn(n,e))return;t.uniform3uiv(this.addr,e),Qn(n,e)}}function AK(t,e){const n=this.cache;if(e.x!==void 0)(n[0]!==e.x||n[1]!==e.y||n[2]!==e.z||n[3]!==e.w)&&(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Yn(n,e))return;t.uniform4uiv(this.addr,e),Qn(n,e)}}function MK(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r);const s=this.type===t.SAMPLER_2D_SHADOW?dj:uj;n.setTexture2D(e||s,r)}function TK(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture3D(e||fj,r)}function EK(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTextureCube(e||pj,r)}function CK(t,e,n){const i=this.cache,r=n.allocateTextureUnit();i[0]!==r&&(t.uniform1i(this.addr,r),i[0]=r),n.setTexture2DArray(e||hj,r)}function PK(t){switch(t){case 5126:return uK;case 35664:return dK;case 35665:return hK;case 35666:return fK;case 35674:return pK;case 35675:return mK;case 35676:return gK;case 5124:case 35670:return xK;case 35667:case 35671:return yK;case 35668:case 35672:return vK;case 35669:case 35673:return wK;case 5125:return bK;case 36294:return _K;case 36295:return SK;case 36296:return AK;case 35678:case 36198:case 36298:case 36306:case 35682:return MK;case 35679:case 36299:case 36307:return TK;case 35680:case 36300:case 36308:case 36293:return EK;case 36289:case 36303:case 36311:case 36292:return CK}}function NK(t,e){t.uniform1fv(this.addr,e)}function RK(t,e){const n=wd(e,this.size,2);t.uniform2fv(this.addr,n)}function IK(t,e){const n=wd(e,this.size,3);t.uniform3fv(this.addr,n)}function kK(t,e){const n=wd(e,this.size,4);t.uniform4fv(this.addr,n)}function LK(t,e){const n=wd(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function DK(t,e){const n=wd(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function FK(t,e){const n=wd(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function jK(t,e){t.uniform1iv(this.addr,e)}function OK(t,e){t.uniform2iv(this.addr,e)}function UK(t,e){t.uniform3iv(this.addr,e)}function zK(t,e){t.uniform4iv(this.addr,e)}function BK(t,e){t.uniform1uiv(this.addr,e)}function VK(t,e){t.uniform2uiv(this.addr,e)}function HK(t,e){t.uniform3uiv(this.addr,e)}function WK(t,e){t.uniform4uiv(this.addr,e)}function GK(t,e,n){const i=this.cache,r=e.length,s=By(n,r);Yn(i,s)||(t.uniform1iv(this.addr,s),Qn(i,s));for(let a=0;a!==r;++a)n.setTexture2D(e[a]||uj,s[a])}function qK(t,e,n){const i=this.cache,r=e.length,s=By(n,r);Yn(i,s)||(t.uniform1iv(this.addr,s),Qn(i,s));for(let a=0;a!==r;++a)n.setTexture3D(e[a]||fj,s[a])}function XK(t,e,n){const i=this.cache,r=e.length,s=By(n,r);Yn(i,s)||(t.uniform1iv(this.addr,s),Qn(i,s));for(let a=0;a!==r;++a)n.setTextureCube(e[a]||pj,s[a])}function $K(t,e,n){const i=this.cache,r=e.length,s=By(n,r);Yn(i,s)||(t.uniform1iv(this.addr,s),Qn(i,s));for(let a=0;a!==r;++a)n.setTexture2DArray(e[a]||hj,s[a])}function YK(t){switch(t){case 5126:return NK;case 35664:return RK;case 35665:return IK;case 35666:return kK;case 35674:return LK;case 35675:return DK;case 35676:return FK;case 5124:case 35670:return jK;case 35667:case 35671:return OK;case 35668:case 35672:return UK;case 35669:case 35673:return zK;case 5125:return BK;case 36294:return VK;case 36295:return HK;case 36296:return WK;case 35678:case 36198:case 36298:case 36306:case 35682:return GK;case 35679:case 36299:case 36307:return qK;case 35680:case 36300:case 36308:case 36293:return XK;case 36289:case 36303:case 36311:case 36292:return $K}}class QK{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.setValue=PK(n.type)}}class KK{constructor(e,n,i){this.id=e,this.addr=i,this.cache=[],this.type=n.type,this.size=n.size,this.setValue=YK(n.type)}}class ZK{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,n,i){const r=this.seq;for(let s=0,a=r.length;s!==a;++s){const o=r[s];o.setValue(e,n[o.id],i)}}}const Dw=/(\w+)(\])?(\[|\.)?/g;function HP(t,e){t.seq.push(e),t.map[e.id]=e}function JK(t,e,n){const i=t.name,r=i.length;for(Dw.lastIndex=0;;){const s=Dw.exec(i),a=Dw.lastIndex;let o=s[1];const c=s[2]==="]",u=s[3];if(c&&(o=o|0),u===void 0||u==="["&&a+2===r){HP(n,u===void 0?new QK(o,t,e):new KK(o,t,e));break}else{let p=n.map[o];p===void 0&&(p=new ZK(o),HP(n,p)),n=p}}}class nx{constructor(e,n){this.seq=[],this.map={};const i=e.getProgramParameter(n,e.ACTIVE_UNIFORMS);for(let r=0;r<i;++r){const s=e.getActiveUniform(n,r),a=e.getUniformLocation(n,s.name);JK(s,a,this)}}setValue(e,n,i,r){const s=this.map[n];s!==void 0&&s.setValue(e,i,r)}setOptional(e,n,i){const r=n[i];r!==void 0&&this.setValue(e,i,r)}static upload(e,n,i,r){for(let s=0,a=n.length;s!==a;++s){const o=n[s],c=i[o.id];c.needsUpdate!==!1&&o.setValue(e,c.value,r)}}static seqWithValue(e,n){const i=[];for(let r=0,s=e.length;r!==s;++r){const a=e[r];a.id in n&&i.push(a)}return i}}function WP(t,e,n){const i=t.createShader(e);return t.shaderSource(i,n),t.compileShader(i),i}const eZ=37297;let tZ=0;function nZ(t,e){const n=t.split(`
`),i=[],r=Math.max(e-6,0),s=Math.min(e+6,n.length);for(let a=r;a<s;a++){const o=a+1;i.push(`${o===e?">":" "} ${o}: ${n[a]}`)}return i.join(`
`)}function iZ(t){const e=$t.getPrimaries($t.workingColorSpace),n=$t.getPrimaries(t);let i;switch(e===n?i="":e===Cf&&n===Ef?i="LinearDisplayP3ToLinearSRGB":e===Ef&&n===Cf&&(i="LinearSRGBToLinearDisplayP3"),t){case Ys:case ip:return[i,"LinearTransferOETF"];case qn:case Uy:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[i,"LinearTransferOETF"]}}function GP(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),r=t.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const a=parseInt(s[1]);return n.toUpperCase()+`
`+r+`
`+nZ(t.getShaderSource(e),a)}else return r}function rZ(t,e){const n=iZ(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function sZ(t,e){let n;switch(e){case CF:n="Linear";break;case PF:n="Reinhard";break;case NF:n="OptimizedCineon";break;case CA:n="ACESFilmic";break;case IF:n="AgX";break;case RF:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function aZ(t){return[t.extensionDerivatives||t.envMapCubeUVHeight||t.bumpMap||t.normalMapTangentSpace||t.clearcoatNormalMap||t.flatShading||t.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(t.extensionFragDepth||t.logarithmicDepthBuffer)&&t.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",t.extensionDrawBuffers&&t.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(t.extensionShaderTextureLOD||t.envMap||t.transmission)&&t.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(_u).join(`
`)}function oZ(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":""].filter(_u).join(`
`)}function lZ(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(`
`)}function cZ(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let r=0;r<i;r++){const s=t.getActiveAttrib(e,r),a=s.name;let o=1;s.type===t.FLOAT_MAT2&&(o=2),s.type===t.FLOAT_MAT3&&(o=3),s.type===t.FLOAT_MAT4&&(o=4),n[a]={type:s.type,location:t.getAttribLocation(e,a),locationSize:o}}return n}function _u(t){return t!==""}function qP(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function XP(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const uZ=/^[ \t]*#include +<([\w\d./]+)>/gm;function v_(t){return t.replace(uZ,hZ)}const dZ=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function hZ(t,e){let n=Tt[e];if(n===void 0){const i=dZ.get(e);if(i!==void 0)n=Tt[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return v_(n)}const fZ=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function $P(t){return t.replace(fZ,pZ)}function pZ(t,e,n,i){let r="";for(let s=parseInt(e);s<parseInt(n);s++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+s+" ]").replace(/UNROLLED_LOOP_INDEX/g,s);return r}function YP(t){let e="precision "+t.precision+` float;
precision `+t.precision+" int;";return t.precision==="highp"?e+=`
#define HIGH_PRECISION`:t.precision==="mediump"?e+=`
#define MEDIUM_PRECISION`:t.precision==="lowp"&&(e+=`
#define LOW_PRECISION`),e}function mZ(t){let e="SHADOWMAP_TYPE_BASIC";return t.shadowMapType===Dy?e="SHADOWMAP_TYPE_PCF":t.shadowMapType===Dh?e="SHADOWMAP_TYPE_PCF_SOFT":t.shadowMapType===ss&&(e="SHADOWMAP_TYPE_VSM"),e}function gZ(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case La:case zo:e="ENVMAP_TYPE_CUBE";break;case yd:e="ENVMAP_TYPE_CUBE_UV";break}return e}function xZ(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case zo:e="ENVMAP_MODE_REFRACTION";break}return e}function yZ(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case np:e="ENVMAP_BLENDING_MULTIPLY";break;case TF:e="ENVMAP_BLENDING_MIX";break;case EF:e="ENVMAP_BLENDING_ADD";break}return e}function vZ(t){const e=t.envMapCubeUVHeight;if(e===null)return null;const n=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),7*16)),texelHeight:i,maxMip:n}}function wZ(t,e,n,i){const r=t.getContext(),s=n.defines;let a=n.vertexShader,o=n.fragmentShader;const c=mZ(n),u=gZ(n),f=xZ(n),p=yZ(n),m=vZ(n),g=n.isWebGL2?"":aZ(n),y=oZ(n),b=lZ(s),w=r.createProgram();let x,_,S=n.glslVersion?"#version "+n.glslVersion+`
`:"";n.isRawShaderMaterial?(x=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(_u).join(`
`),x.length>0&&(x+=`
`),_=[g,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b].filter(_u).join(`
`),_.length>0&&(_+=`
`)):(x=[YP(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+f:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",`
`].filter(_u).join(`
`),_=[g,YP(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,b,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",n.envMap?"#define "+p:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Ws?"#define TONE_MAPPING":"",n.toneMapping!==Ws?Tt.tonemapping_pars_fragment:"",n.toneMapping!==Ws?sZ("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Tt.colorspace_pars_fragment,rZ("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",`
`].filter(_u).join(`
`)),a=v_(a),a=qP(a,n),a=XP(a,n),o=v_(o),o=qP(o,n),o=XP(o,n),a=$P(a),o=$P(o),n.isWebGL2&&n.isRawShaderMaterial!==!0&&(S=`#version 300 es
`,x=[y,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+x,_=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===g_?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===g_?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
`)+`
`+_);const M=S+x+a,E=S+_+o,C=WP(r,r.VERTEX_SHADER,M),N=WP(r,r.FRAGMENT_SHADER,E);r.attachShader(w,C),r.attachShader(w,N),n.index0AttributeName!==void 0?r.bindAttribLocation(w,0,n.index0AttributeName):n.morphTargets===!0&&r.bindAttribLocation(w,0,"position"),r.linkProgram(w);function D(G){if(t.debug.checkShaderErrors){const ie=r.getProgramInfoLog(w).trim(),z=r.getShaderInfoLog(C).trim(),$=r.getShaderInfoLog(N).trim();let X=!0,ee=!0;if(r.getProgramParameter(w,r.LINK_STATUS)===!1)if(X=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(r,w,C,N);else{const L=GP(r,C,"vertex"),j=GP(r,N,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(w,r.VALIDATE_STATUS)+`
Program Info Log: `+ie+`
`+L+`
`+j)}else ie!==""?console.warn("THREE.WebGLProgram: Program Info Log:",ie):(z===""||$==="")&&(ee=!1);ee&&(G.diagnostics={runnable:X,programLog:ie,vertexShader:{log:z,prefix:x},fragmentShader:{log:$,prefix:_}})}r.deleteShader(C),r.deleteShader(N),R=new nx(r,w),k=cZ(r,w)}let R;this.getUniforms=function(){return R===void 0&&D(this),R};let k;this.getAttributes=function(){return k===void 0&&D(this),k};let V=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return V===!1&&(V=r.getProgramParameter(w,eZ)),V},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(w),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=tZ++,this.cacheKey=e,this.usedTimes=1,this.program=w,this.vertexShader=C,this.fragmentShader=N,this}let bZ=0;class _Z{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(n),s=this._getShaderStage(i),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(s)===!1&&(a.add(s),s.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new SZ(e),n.set(e,i)),i}}class SZ{constructor(e){this.id=bZ++,this.code=e,this.usedTimes=0}}function AZ(t,e,n,i,r,s,a){const o=new ql,c=new _Z,u=[],f=r.isWebGL2,p=r.logarithmicDepthBuffer,m=r.vertexTextures;let g=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function b(R){return R===0?"uv":`uv${R}`}function w(R,k,V,G,ie){const z=G.fog,$=ie.geometry,X=R.isMeshStandardMaterial?G.environment:null,ee=(R.isMeshStandardMaterial?n:e).get(R.envMap||X),L=ee&&ee.mapping===yd?ee.image.height:null,j=y[R.type];R.precision!==null&&(g=r.getMaxPrecision(R.precision),g!==R.precision&&console.warn("THREE.WebGLProgram.getParameters:",R.precision,"not supported, using",g,"instead."));const B=$.morphAttributes.position||$.morphAttributes.normal||$.morphAttributes.color,Y=B!==void 0?B.length:0;let Z=0;$.morphAttributes.position!==void 0&&(Z=1),$.morphAttributes.normal!==void 0&&(Z=2),$.morphAttributes.color!==void 0&&(Z=3);let K,se,ge,Ce;if(j){const Xt=us[j];K=Xt.vertexShader,se=Xt.fragmentShader}else K=R.vertexShader,se=R.fragmentShader,c.update(R),ge=c.getVertexShaderID(R),Ce=c.getFragmentShaderID(R);const xe=t.getRenderTarget(),nt=ie.isInstancedMesh===!0,it=ie.isBatchedMesh===!0,ze=!!R.map,Xe=!!R.matcap,q=!!ee,_e=!!R.aoMap,fe=!!R.lightMap,Te=!!R.bumpMap,he=!!R.normalMap,Qe=!!R.displacementMap,De=!!R.emissiveMap,O=!!R.metalnessMap,F=!!R.roughnessMap,ne=R.anisotropy>0,Se=R.clearcoat>0,ve=R.iridescence>0,we=R.sheen>0,$e=R.transmission>0,Pe=ne&&!!R.anisotropyMap,je=Se&&!!R.clearcoatMap,st=Se&&!!R.clearcoatNormalMap,gt=Se&&!!R.clearcoatRoughnessMap,be=ve&&!!R.iridescenceMap,Dt=ve&&!!R.iridescenceThicknessMap,St=we&&!!R.sheenColorMap,ut=we&&!!R.sheenRoughnessMap,Ke=!!R.specularMap,Ve=!!R.specularColorMap,dt=!!R.specularIntensityMap,jt=$e&&!!R.transmissionMap,Jt=$e&&!!R.thicknessMap,vt=!!R.gradientMap,Re=!!R.alphaMap,Q=R.alphaTest>0,Le=!!R.alphaHash,Ie=!!R.extensions,ot=!!$.attributes.uv1,Me=!!$.attributes.uv2,Je=!!$.attributes.uv3;let rt=Ws;return R.toneMapped&&(xe===null||xe.isXRRenderTarget===!0)&&(rt=t.toneMapping),{isWebGL2:f,shaderID:j,shaderType:R.type,shaderName:R.name,vertexShader:K,fragmentShader:se,defines:R.defines,customVertexShaderID:ge,customFragmentShaderID:Ce,isRawShaderMaterial:R.isRawShaderMaterial===!0,glslVersion:R.glslVersion,precision:g,batching:it,instancing:nt,instancingColor:nt&&ie.instanceColor!==null,supportsVertexTextures:m,outputColorSpace:xe===null?t.outputColorSpace:xe.isXRRenderTarget===!0?xe.texture.colorSpace:Ys,map:ze,matcap:Xe,envMap:q,envMapMode:q&&ee.mapping,envMapCubeUVHeight:L,aoMap:_e,lightMap:fe,bumpMap:Te,normalMap:he,displacementMap:m&&Qe,emissiveMap:De,normalMapObjectSpace:he&&R.normalMapType===XF,normalMapTangentSpace:he&&R.normalMapType===Yo,metalnessMap:O,roughnessMap:F,anisotropy:ne,anisotropyMap:Pe,clearcoat:Se,clearcoatMap:je,clearcoatNormalMap:st,clearcoatRoughnessMap:gt,iridescence:ve,iridescenceMap:be,iridescenceThicknessMap:Dt,sheen:we,sheenColorMap:St,sheenRoughnessMap:ut,specularMap:Ke,specularColorMap:Ve,specularIntensityMap:dt,transmission:$e,transmissionMap:jt,thicknessMap:Jt,gradientMap:vt,opaque:R.transparent===!1&&R.blending===Wl,alphaMap:Re,alphaTest:Q,alphaHash:Le,combine:R.combine,mapUv:ze&&b(R.map.channel),aoMapUv:_e&&b(R.aoMap.channel),lightMapUv:fe&&b(R.lightMap.channel),bumpMapUv:Te&&b(R.bumpMap.channel),normalMapUv:he&&b(R.normalMap.channel),displacementMapUv:Qe&&b(R.displacementMap.channel),emissiveMapUv:De&&b(R.emissiveMap.channel),metalnessMapUv:O&&b(R.metalnessMap.channel),roughnessMapUv:F&&b(R.roughnessMap.channel),anisotropyMapUv:Pe&&b(R.anisotropyMap.channel),clearcoatMapUv:je&&b(R.clearcoatMap.channel),clearcoatNormalMapUv:st&&b(R.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:gt&&b(R.clearcoatRoughnessMap.channel),iridescenceMapUv:be&&b(R.iridescenceMap.channel),iridescenceThicknessMapUv:Dt&&b(R.iridescenceThicknessMap.channel),sheenColorMapUv:St&&b(R.sheenColorMap.channel),sheenRoughnessMapUv:ut&&b(R.sheenRoughnessMap.channel),specularMapUv:Ke&&b(R.specularMap.channel),specularColorMapUv:Ve&&b(R.specularColorMap.channel),specularIntensityMapUv:dt&&b(R.specularIntensityMap.channel),transmissionMapUv:jt&&b(R.transmissionMap.channel),thicknessMapUv:Jt&&b(R.thicknessMap.channel),alphaMapUv:Re&&b(R.alphaMap.channel),vertexTangents:!!$.attributes.tangent&&(he||ne),vertexColors:R.vertexColors,vertexAlphas:R.vertexColors===!0&&!!$.attributes.color&&$.attributes.color.itemSize===4,vertexUv1s:ot,vertexUv2s:Me,vertexUv3s:Je,pointsUvs:ie.isPoints===!0&&!!$.attributes.uv&&(ze||Re),fog:!!z,useFog:R.fog===!0,fogExp2:z&&z.isFogExp2,flatShading:R.flatShading===!0,sizeAttenuation:R.sizeAttenuation===!0,logarithmicDepthBuffer:p,skinning:ie.isSkinnedMesh===!0,morphTargets:$.morphAttributes.position!==void 0,morphNormals:$.morphAttributes.normal!==void 0,morphColors:$.morphAttributes.color!==void 0,morphTargetsCount:Y,morphTextureStride:Z,numDirLights:k.directional.length,numPointLights:k.point.length,numSpotLights:k.spot.length,numSpotLightMaps:k.spotLightMap.length,numRectAreaLights:k.rectArea.length,numHemiLights:k.hemi.length,numDirLightShadows:k.directionalShadowMap.length,numPointLightShadows:k.pointShadowMap.length,numSpotLightShadows:k.spotShadowMap.length,numSpotLightShadowsWithMaps:k.numSpotLightShadowsWithMaps,numLightProbes:k.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:R.dithering,shadowMapEnabled:t.shadowMap.enabled&&V.length>0,shadowMapType:t.shadowMap.type,toneMapping:rt,useLegacyLights:t._useLegacyLights,decodeVideoTexture:ze&&R.map.isVideoTexture===!0&&$t.getTransfer(R.map.colorSpace)===en,premultipliedAlpha:R.premultipliedAlpha,doubleSided:R.side===js,flipSided:R.side===Vi,useDepthPacking:R.depthPacking>=0,depthPacking:R.depthPacking||0,index0AttributeName:R.index0AttributeName,extensionDerivatives:Ie&&R.extensions.derivatives===!0,extensionFragDepth:Ie&&R.extensions.fragDepth===!0,extensionDrawBuffers:Ie&&R.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ie&&R.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ie&&R.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),rendererExtensionFragDepth:f||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:f||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:f||i.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:R.customProgramCacheKey()}}function x(R){const k=[];if(R.shaderID?k.push(R.shaderID):(k.push(R.customVertexShaderID),k.push(R.customFragmentShaderID)),R.defines!==void 0)for(const V in R.defines)k.push(V),k.push(R.defines[V]);return R.isRawShaderMaterial===!1&&(_(k,R),S(k,R),k.push(t.outputColorSpace)),k.push(R.customProgramCacheKey),k.join()}function _(R,k){R.push(k.precision),R.push(k.outputColorSpace),R.push(k.envMapMode),R.push(k.envMapCubeUVHeight),R.push(k.mapUv),R.push(k.alphaMapUv),R.push(k.lightMapUv),R.push(k.aoMapUv),R.push(k.bumpMapUv),R.push(k.normalMapUv),R.push(k.displacementMapUv),R.push(k.emissiveMapUv),R.push(k.metalnessMapUv),R.push(k.roughnessMapUv),R.push(k.anisotropyMapUv),R.push(k.clearcoatMapUv),R.push(k.clearcoatNormalMapUv),R.push(k.clearcoatRoughnessMapUv),R.push(k.iridescenceMapUv),R.push(k.iridescenceThicknessMapUv),R.push(k.sheenColorMapUv),R.push(k.sheenRoughnessMapUv),R.push(k.specularMapUv),R.push(k.specularColorMapUv),R.push(k.specularIntensityMapUv),R.push(k.transmissionMapUv),R.push(k.thicknessMapUv),R.push(k.combine),R.push(k.fogExp2),R.push(k.sizeAttenuation),R.push(k.morphTargetsCount),R.push(k.morphAttributeCount),R.push(k.numDirLights),R.push(k.numPointLights),R.push(k.numSpotLights),R.push(k.numSpotLightMaps),R.push(k.numHemiLights),R.push(k.numRectAreaLights),R.push(k.numDirLightShadows),R.push(k.numPointLightShadows),R.push(k.numSpotLightShadows),R.push(k.numSpotLightShadowsWithMaps),R.push(k.numLightProbes),R.push(k.shadowMapType),R.push(k.toneMapping),R.push(k.numClippingPlanes),R.push(k.numClipIntersection),R.push(k.depthPacking)}function S(R,k){o.disableAll(),k.isWebGL2&&o.enable(0),k.supportsVertexTextures&&o.enable(1),k.instancing&&o.enable(2),k.instancingColor&&o.enable(3),k.matcap&&o.enable(4),k.envMap&&o.enable(5),k.normalMapObjectSpace&&o.enable(6),k.normalMapTangentSpace&&o.enable(7),k.clearcoat&&o.enable(8),k.iridescence&&o.enable(9),k.alphaTest&&o.enable(10),k.vertexColors&&o.enable(11),k.vertexAlphas&&o.enable(12),k.vertexUv1s&&o.enable(13),k.vertexUv2s&&o.enable(14),k.vertexUv3s&&o.enable(15),k.vertexTangents&&o.enable(16),k.anisotropy&&o.enable(17),k.alphaHash&&o.enable(18),k.batching&&o.enable(19),R.push(o.mask),o.disableAll(),k.fog&&o.enable(0),k.useFog&&o.enable(1),k.flatShading&&o.enable(2),k.logarithmicDepthBuffer&&o.enable(3),k.skinning&&o.enable(4),k.morphTargets&&o.enable(5),k.morphNormals&&o.enable(6),k.morphColors&&o.enable(7),k.premultipliedAlpha&&o.enable(8),k.shadowMapEnabled&&o.enable(9),k.useLegacyLights&&o.enable(10),k.doubleSided&&o.enable(11),k.flipSided&&o.enable(12),k.useDepthPacking&&o.enable(13),k.dithering&&o.enable(14),k.transmission&&o.enable(15),k.sheen&&o.enable(16),k.opaque&&o.enable(17),k.pointsUvs&&o.enable(18),k.decodeVideoTexture&&o.enable(19),R.push(o.mask)}function M(R){const k=y[R.type];let V;if(k){const G=us[k];V=aj.clone(G.uniforms)}else V=R.uniforms;return V}function E(R,k){let V;for(let G=0,ie=u.length;G<ie;G++){const z=u[G];if(z.cacheKey===k){V=z,++V.usedTimes;break}}return V===void 0&&(V=new wZ(t,k,R,s),u.push(V)),V}function C(R){if(--R.usedTimes===0){const k=u.indexOf(R);u[k]=u[u.length-1],u.pop(),R.destroy()}}function N(R){c.remove(R)}function D(){c.dispose()}return{getParameters:w,getProgramCacheKey:x,getUniforms:M,acquireProgram:E,releaseProgram:C,releaseShaderCache:N,programs:u,dispose:D}}function MZ(){let t=new WeakMap;function e(s){let a=t.get(s);return a===void 0&&(a={},t.set(s,a)),a}function n(s){t.delete(s)}function i(s,a,o){t.get(s)[a]=o}function r(){t=new WeakMap}return{get:e,remove:n,update:i,dispose:r}}function TZ(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function QP(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function KP(){const t=[];let e=0;const n=[],i=[],r=[];function s(){e=0,n.length=0,i.length=0,r.length=0}function a(p,m,g,y,b,w){let x=t[e];return x===void 0?(x={id:p.id,object:p,geometry:m,material:g,groupOrder:y,renderOrder:p.renderOrder,z:b,group:w},t[e]=x):(x.id=p.id,x.object=p,x.geometry=m,x.material=g,x.groupOrder=y,x.renderOrder=p.renderOrder,x.z=b,x.group=w),e++,x}function o(p,m,g,y,b,w){const x=a(p,m,g,y,b,w);g.transmission>0?i.push(x):g.transparent===!0?r.push(x):n.push(x)}function c(p,m,g,y,b,w){const x=a(p,m,g,y,b,w);g.transmission>0?i.unshift(x):g.transparent===!0?r.unshift(x):n.unshift(x)}function u(p,m){n.length>1&&n.sort(p||TZ),i.length>1&&i.sort(m||QP),r.length>1&&r.sort(m||QP)}function f(){for(let p=e,m=t.length;p<m;p++){const g=t[p];if(g.id===null)break;g.id=null,g.object=null,g.geometry=null,g.material=null,g.group=null}}return{opaque:n,transmissive:i,transparent:r,init:s,push:o,unshift:c,finish:f,sort:u}}function EZ(){let t=new WeakMap;function e(i,r){const s=t.get(i);let a;return s===void 0?(a=new KP,t.set(i,[a])):r>=s.length?(a=new KP,s.push(a)):a=s[r],a}function n(){t=new WeakMap}return{get:e,dispose:n}}function CZ(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new H,color:new Ue};break;case"SpotLight":n={position:new H,direction:new H,color:new Ue,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new H,color:new Ue,distance:0,decay:0};break;case"HemisphereLight":n={direction:new H,skyColor:new Ue,groundColor:new Ue};break;case"RectAreaLight":n={color:new Ue,position:new H,halfWidth:new H,halfHeight:new H};break}return t[e.id]=n,n}}}function PZ(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let NZ=0;function RZ(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function IZ(t,e){const n=new CZ,i=PZ(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let f=0;f<9;f++)r.probe.push(new H);const s=new H,a=new pt,o=new pt;function c(f,p){let m=0,g=0,y=0;for(let G=0;G<9;G++)r.probe[G].set(0,0,0);let b=0,w=0,x=0,_=0,S=0,M=0,E=0,C=0,N=0,D=0,R=0;f.sort(RZ);const k=p===!0?Math.PI:1;for(let G=0,ie=f.length;G<ie;G++){const z=f[G],$=z.color,X=z.intensity,ee=z.distance,L=z.shadow&&z.shadow.map?z.shadow.map.texture:null;if(z.isAmbientLight)m+=$.r*X*k,g+=$.g*X*k,y+=$.b*X*k;else if(z.isLightProbe){for(let j=0;j<9;j++)r.probe[j].addScaledVector(z.sh.coefficients[j],X);R++}else if(z.isDirectionalLight){const j=n.get(z);if(j.color.copy(z.color).multiplyScalar(z.intensity*k),z.castShadow){const B=z.shadow,Y=i.get(z);Y.shadowBias=B.bias,Y.shadowNormalBias=B.normalBias,Y.shadowRadius=B.radius,Y.shadowMapSize=B.mapSize,r.directionalShadow[b]=Y,r.directionalShadowMap[b]=L,r.directionalShadowMatrix[b]=z.shadow.matrix,M++}r.directional[b]=j,b++}else if(z.isSpotLight){const j=n.get(z);j.position.setFromMatrixPosition(z.matrixWorld),j.color.copy($).multiplyScalar(X*k),j.distance=ee,j.coneCos=Math.cos(z.angle),j.penumbraCos=Math.cos(z.angle*(1-z.penumbra)),j.decay=z.decay,r.spot[x]=j;const B=z.shadow;if(z.map&&(r.spotLightMap[N]=z.map,N++,B.updateMatrices(z),z.castShadow&&D++),r.spotLightMatrix[x]=B.matrix,z.castShadow){const Y=i.get(z);Y.shadowBias=B.bias,Y.shadowNormalBias=B.normalBias,Y.shadowRadius=B.radius,Y.shadowMapSize=B.mapSize,r.spotShadow[x]=Y,r.spotShadowMap[x]=L,C++}x++}else if(z.isRectAreaLight){const j=n.get(z);j.color.copy($).multiplyScalar(X),j.halfWidth.set(z.width*.5,0,0),j.halfHeight.set(0,z.height*.5,0),r.rectArea[_]=j,_++}else if(z.isPointLight){const j=n.get(z);if(j.color.copy(z.color).multiplyScalar(z.intensity*k),j.distance=z.distance,j.decay=z.decay,z.castShadow){const B=z.shadow,Y=i.get(z);Y.shadowBias=B.bias,Y.shadowNormalBias=B.normalBias,Y.shadowRadius=B.radius,Y.shadowMapSize=B.mapSize,Y.shadowCameraNear=B.camera.near,Y.shadowCameraFar=B.camera.far,r.pointShadow[w]=Y,r.pointShadowMap[w]=L,r.pointShadowMatrix[w]=z.shadow.matrix,E++}r.point[w]=j,w++}else if(z.isHemisphereLight){const j=n.get(z);j.skyColor.copy(z.color).multiplyScalar(X*k),j.groundColor.copy(z.groundColor).multiplyScalar(X*k),r.hemi[S]=j,S++}}_>0&&(e.isWebGL2?t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=ke.LTC_FLOAT_1,r.rectAreaLTC2=ke.LTC_FLOAT_2):(r.rectAreaLTC1=ke.LTC_HALF_1,r.rectAreaLTC2=ke.LTC_HALF_2):t.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=ke.LTC_FLOAT_1,r.rectAreaLTC2=ke.LTC_FLOAT_2):t.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=ke.LTC_HALF_1,r.rectAreaLTC2=ke.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=m,r.ambient[1]=g,r.ambient[2]=y;const V=r.hash;(V.directionalLength!==b||V.pointLength!==w||V.spotLength!==x||V.rectAreaLength!==_||V.hemiLength!==S||V.numDirectionalShadows!==M||V.numPointShadows!==E||V.numSpotShadows!==C||V.numSpotMaps!==N||V.numLightProbes!==R)&&(r.directional.length=b,r.spot.length=x,r.rectArea.length=_,r.point.length=w,r.hemi.length=S,r.directionalShadow.length=M,r.directionalShadowMap.length=M,r.pointShadow.length=E,r.pointShadowMap.length=E,r.spotShadow.length=C,r.spotShadowMap.length=C,r.directionalShadowMatrix.length=M,r.pointShadowMatrix.length=E,r.spotLightMatrix.length=C+N-D,r.spotLightMap.length=N,r.numSpotLightShadowsWithMaps=D,r.numLightProbes=R,V.directionalLength=b,V.pointLength=w,V.spotLength=x,V.rectAreaLength=_,V.hemiLength=S,V.numDirectionalShadows=M,V.numPointShadows=E,V.numSpotShadows=C,V.numSpotMaps=N,V.numLightProbes=R,r.version=NZ++)}function u(f,p){let m=0,g=0,y=0,b=0,w=0;const x=p.matrixWorldInverse;for(let _=0,S=f.length;_<S;_++){const M=f[_];if(M.isDirectionalLight){const E=r.directional[m];E.direction.setFromMatrixPosition(M.matrixWorld),s.setFromMatrixPosition(M.target.matrixWorld),E.direction.sub(s),E.direction.transformDirection(x),m++}else if(M.isSpotLight){const E=r.spot[y];E.position.setFromMatrixPosition(M.matrixWorld),E.position.applyMatrix4(x),E.direction.setFromMatrixPosition(M.matrixWorld),s.setFromMatrixPosition(M.target.matrixWorld),E.direction.sub(s),E.direction.transformDirection(x),y++}else if(M.isRectAreaLight){const E=r.rectArea[b];E.position.setFromMatrixPosition(M.matrixWorld),E.position.applyMatrix4(x),o.identity(),a.copy(M.matrixWorld),a.premultiply(x),o.extractRotation(a),E.halfWidth.set(M.width*.5,0,0),E.halfHeight.set(0,M.height*.5,0),E.halfWidth.applyMatrix4(o),E.halfHeight.applyMatrix4(o),b++}else if(M.isPointLight){const E=r.point[g];E.position.setFromMatrixPosition(M.matrixWorld),E.position.applyMatrix4(x),g++}else if(M.isHemisphereLight){const E=r.hemi[w];E.direction.setFromMatrixPosition(M.matrixWorld),E.direction.transformDirection(x),w++}}}return{setup:c,setupView:u,state:r}}function ZP(t,e){const n=new IZ(t,e),i=[],r=[];function s(){i.length=0,r.length=0}function a(p){i.push(p)}function o(p){r.push(p)}function c(p){n.setup(i,p)}function u(p){n.setupView(i,p)}return{init:s,state:{lightsArray:i,shadowsArray:r,lights:n},setupLights:c,setupLightsView:u,pushLight:a,pushShadow:o}}function kZ(t,e){let n=new WeakMap;function i(s,a=0){const o=n.get(s);let c;return o===void 0?(c=new ZP(t,e),n.set(s,[c])):a>=o.length?(c=new ZP(t,e),o.push(c)):c=o[a],c}function r(){n=new WeakMap}return{get:i,dispose:r}}class XA extends Ii{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=GF,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class $A extends Ii{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const LZ=`void main() {
gl_Position = vec4( position, 1.0 );
}`,DZ=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
const float samples = float( VSM_SAMPLES );
float mean = 0.0;
float squared_mean = 0.0;
float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
for ( float i = 0.0; i < samples; i ++ ) {
float uvOffset = uvStart + i * uvStride;
#ifdef HORIZONTAL_PASS
vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
mean += distribution.x;
squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
#else
float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
mean += depth;
squared_mean += depth * depth;
#endif
}
mean = mean / samples;
squared_mean = squared_mean / samples;
float std_dev = sqrt( squared_mean - mean * mean );
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function FZ(t,e,n){let i=new op;const r=new ye,s=new ye,a=new Yt,o=new XA({depthPacking:qF}),c=new $A,u={},f=n.maxTextureSize,p={[ka]:Vi,[Vi]:ka,[js]:js},m=new Qs({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ye},radius:{value:4}},vertexShader:LZ,fragmentShader:DZ}),g=m.clone();g.defines.HORIZONTAL_PASS=1;const y=new At;y.setAttribute("position",new qt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new $n(y,m),w=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Dy;let x=this.type;this.render=function(C,N,D){if(w.enabled===!1||w.autoUpdate===!1&&w.needsUpdate===!1||C.length===0)return;const R=t.getRenderTarget(),k=t.getActiveCubeFace(),V=t.getActiveMipmapLevel(),G=t.state;G.setBlending(Ma),G.buffers.color.setClear(1,1,1,1),G.buffers.depth.setTest(!0),G.setScissorTest(!1);const ie=x!==ss&&this.type===ss,z=x===ss&&this.type!==ss;for(let $=0,X=C.length;$<X;$++){const ee=C[$],L=ee.shadow;if(L===void 0){console.warn("THREE.WebGLShadowMap:",ee,"has no shadow.");continue}if(L.autoUpdate===!1&&L.needsUpdate===!1)continue;r.copy(L.mapSize);const j=L.getFrameExtents();if(r.multiply(j),s.copy(L.mapSize),(r.x>f||r.y>f)&&(r.x>f&&(s.x=Math.floor(f/j.x),r.x=s.x*j.x,L.mapSize.x=s.x),r.y>f&&(s.y=Math.floor(f/j.y),r.y=s.y*j.y,L.mapSize.y=s.y)),L.map===null||ie===!0||z===!0){const Y=this.type!==ss?{minFilter:Ln,magFilter:Ln}:{};L.map!==null&&L.map.dispose(),L.map=new ys(r.x,r.y,Y),L.map.texture.name=ee.name+".shadowMap",L.camera.updateProjectionMatrix()}t.setRenderTarget(L.map),t.clear();const B=L.getViewportCount();for(let Y=0;Y<B;Y++){const Z=L.getViewport(Y);a.set(s.x*Z.x,s.y*Z.y,s.x*Z.z,s.y*Z.w),G.viewport(a),L.updateMatrices(ee,Y),i=L.getFrustum(),M(N,D,L.camera,ee,this.type)}L.isPointLightShadow!==!0&&this.type===ss&&_(L,D),L.needsUpdate=!1}x=this.type,w.needsUpdate=!1,t.setRenderTarget(R,k,V)};function _(C,N){const D=e.update(b);m.defines.VSM_SAMPLES!==C.blurSamples&&(m.defines.VSM_SAMPLES=C.blurSamples,g.defines.VSM_SAMPLES=C.blurSamples,m.needsUpdate=!0,g.needsUpdate=!0),C.mapPass===null&&(C.mapPass=new ys(r.x,r.y)),m.uniforms.shadow_pass.value=C.map.texture,m.uniforms.resolution.value=C.mapSize,m.uniforms.radius.value=C.radius,t.setRenderTarget(C.mapPass),t.clear(),t.renderBufferDirect(N,null,D,m,b,null),g.uniforms.shadow_pass.value=C.mapPass.texture,g.uniforms.resolution.value=C.mapSize,g.uniforms.radius.value=C.radius,t.setRenderTarget(C.map),t.clear(),t.renderBufferDirect(N,null,D,g,b,null)}function S(C,N,D,R){let k=null;const V=D.isPointLight===!0?C.customDistanceMaterial:C.customDepthMaterial;if(V!==void 0)k=V;else if(k=D.isPointLight===!0?c:o,t.localClippingEnabled&&N.clipShadows===!0&&Array.isArray(N.clippingPlanes)&&N.clippingPlanes.length!==0||N.displacementMap&&N.displacementScale!==0||N.alphaMap&&N.alphaTest>0||N.map&&N.alphaTest>0){const G=k.uuid,ie=N.uuid;let z=u[G];z===void 0&&(z={},u[G]=z);let $=z[ie];$===void 0&&($=k.clone(),z[ie]=$,N.addEventListener("dispose",E)),k=$}if(k.visible=N.visible,k.wireframe=N.wireframe,R===ss?k.side=N.shadowSide!==null?N.shadowSide:N.side:k.side=N.shadowSide!==null?N.shadowSide:p[N.side],k.alphaMap=N.alphaMap,k.alphaTest=N.alphaTest,k.map=N.map,k.clipShadows=N.clipShadows,k.clippingPlanes=N.clippingPlanes,k.clipIntersection=N.clipIntersection,k.displacementMap=N.displacementMap,k.displacementScale=N.displacementScale,k.displacementBias=N.displacementBias,k.wireframeLinewidth=N.wireframeLinewidth,k.linewidth=N.linewidth,D.isPointLight===!0&&k.isMeshDistanceMaterial===!0){const G=t.properties.get(k);G.light=D}return k}function M(C,N,D,R,k){if(C.visible===!1)return;if(C.layers.test(N.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&k===ss)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);const ie=e.update(C),z=C.material;if(Array.isArray(z)){const $=ie.groups;for(let X=0,ee=$.length;X<ee;X++){const L=$[X],j=z[L.materialIndex];if(j&&j.visible){const B=S(C,j,R,k);C.onBeforeShadow(t,C,N,D,ie,B,L),t.renderBufferDirect(D,null,ie,B,C,L),C.onAfterShadow(t,C,N,D,ie,B,L)}}}else if(z.visible){const $=S(C,z,R,k);C.onBeforeShadow(t,C,N,D,ie,$,null),t.renderBufferDirect(D,null,ie,$,C,null),C.onAfterShadow(t,C,N,D,ie,$,null)}}const G=C.children;for(let ie=0,z=G.length;ie<z;ie++)M(G[ie],N,D,R,k)}function E(C){C.target.removeEventListener("dispose",E);for(const D in u){const R=u[D],k=C.target.uuid;k in R&&(R[k].dispose(),delete R[k])}}}function jZ(t,e,n){const i=n.isWebGL2;function r(){let Q=!1;const Le=new Yt;let Ie=null;const ot=new Yt(0,0,0,0);return{setMask:function(Me){Ie!==Me&&!Q&&(t.colorMask(Me,Me,Me,Me),Ie=Me)},setLocked:function(Me){Q=Me},setClear:function(Me,Je,rt,Ot,Xt){Xt===!0&&(Me*=Ot,Je*=Ot,rt*=Ot),Le.set(Me,Je,rt,Ot),ot.equals(Le)===!1&&(t.clearColor(Me,Je,rt,Ot),ot.copy(Le))},reset:function(){Q=!1,Ie=null,ot.set(-1,0,0,0)}}}function s(){let Q=!1,Le=null,Ie=null,ot=null;return{setTest:function(Me){Me?it(t.DEPTH_TEST):ze(t.DEPTH_TEST)},setMask:function(Me){Le!==Me&&!Q&&(t.depthMask(Me),Le=Me)},setFunc:function(Me){if(Ie!==Me){switch(Me){case vF:t.depthFunc(t.NEVER);break;case wF:t.depthFunc(t.ALWAYS);break;case bF:t.depthFunc(t.LESS);break;case yf:t.depthFunc(t.LEQUAL);break;case _F:t.depthFunc(t.EQUAL);break;case SF:t.depthFunc(t.GEQUAL);break;case AF:t.depthFunc(t.GREATER);break;case MF:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}Ie=Me}},setLocked:function(Me){Q=Me},setClear:function(Me){ot!==Me&&(t.clearDepth(Me),ot=Me)},reset:function(){Q=!1,Le=null,Ie=null,ot=null}}}function a(){let Q=!1,Le=null,Ie=null,ot=null,Me=null,Je=null,rt=null,Ot=null,Xt=null;return{setTest:function(It){Q||(It?it(t.STENCIL_TEST):ze(t.STENCIL_TEST))},setMask:function(It){Le!==It&&!Q&&(t.stencilMask(It),Le=It)},setFunc:function(It,nn,hn){(Ie!==It||ot!==nn||Me!==hn)&&(t.stencilFunc(It,nn,hn),Ie=It,ot=nn,Me=hn)},setOp:function(It,nn,hn){(Je!==It||rt!==nn||Ot!==hn)&&(t.stencilOp(It,nn,hn),Je=It,rt=nn,Ot=hn)},setLocked:function(It){Q=It},setClear:function(It){Xt!==It&&(t.clearStencil(It),Xt=It)},reset:function(){Q=!1,Le=null,Ie=null,ot=null,Me=null,Je=null,rt=null,Ot=null,Xt=null}}}const o=new r,c=new s,u=new a,f=new WeakMap,p=new WeakMap;let m={},g={},y=new WeakMap,b=[],w=null,x=!1,_=null,S=null,M=null,E=null,C=null,N=null,D=null,R=new Ue(0,0,0),k=0,V=!1,G=null,ie=null,z=null,$=null,X=null;const ee=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let L=!1,j=0;const B=t.getParameter(t.VERSION);B.indexOf("WebGL")!==-1?(j=parseFloat(/^WebGL (\d)/.exec(B)[1]),L=j>=1):B.indexOf("OpenGL ES")!==-1&&(j=parseFloat(/^OpenGL ES (\d)/.exec(B)[1]),L=j>=2);let Y=null,Z={};const K=t.getParameter(t.SCISSOR_BOX),se=t.getParameter(t.VIEWPORT),ge=new Yt().fromArray(K),Ce=new Yt().fromArray(se);function xe(Q,Le,Ie,ot){const Me=new Uint8Array(4),Je=t.createTexture();t.bindTexture(Q,Je),t.texParameteri(Q,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(Q,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let rt=0;rt<Ie;rt++)i&&(Q===t.TEXTURE_3D||Q===t.TEXTURE_2D_ARRAY)?t.texImage3D(Le,0,t.RGBA,1,1,ot,0,t.RGBA,t.UNSIGNED_BYTE,Me):t.texImage2D(Le+rt,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,Me);return Je}const nt={};nt[t.TEXTURE_2D]=xe(t.TEXTURE_2D,t.TEXTURE_2D,1),nt[t.TEXTURE_CUBE_MAP]=xe(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),i&&(nt[t.TEXTURE_2D_ARRAY]=xe(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),nt[t.TEXTURE_3D]=xe(t.TEXTURE_3D,t.TEXTURE_3D,1,1)),o.setClear(0,0,0,1),c.setClear(1),u.setClear(0),it(t.DEPTH_TEST),c.setFunc(yf),De(!1),O(j1),it(t.CULL_FACE),he(Ma);function it(Q){m[Q]!==!0&&(t.enable(Q),m[Q]=!0)}function ze(Q){m[Q]!==!1&&(t.disable(Q),m[Q]=!1)}function Xe(Q,Le){return g[Q]!==Le?(t.bindFramebuffer(Q,Le),g[Q]=Le,i&&(Q===t.DRAW_FRAMEBUFFER&&(g[t.FRAMEBUFFER]=Le),Q===t.FRAMEBUFFER&&(g[t.DRAW_FRAMEBUFFER]=Le)),!0):!1}function q(Q,Le){let Ie=b,ot=!1;if(Q)if(Ie=y.get(Le),Ie===void 0&&(Ie=[],y.set(Le,Ie)),Q.isWebGLMultipleRenderTargets){const Me=Q.texture;if(Ie.length!==Me.length||Ie[0]!==t.COLOR_ATTACHMENT0){for(let Je=0,rt=Me.length;Je<rt;Je++)Ie[Je]=t.COLOR_ATTACHMENT0+Je;Ie.length=Me.length,ot=!0}}else Ie[0]!==t.COLOR_ATTACHMENT0&&(Ie[0]=t.COLOR_ATTACHMENT0,ot=!0);else Ie[0]!==t.BACK&&(Ie[0]=t.BACK,ot=!0);ot&&(n.isWebGL2?t.drawBuffers(Ie):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(Ie))}function _e(Q){return w!==Q?(t.useProgram(Q),w=Q,!0):!1}const fe={[ho]:t.FUNC_ADD,[rF]:t.FUNC_SUBTRACT,[sF]:t.FUNC_REVERSE_SUBTRACT};if(i)fe[B1]=t.MIN,fe[V1]=t.MAX;else{const Q=e.get("EXT_blend_minmax");Q!==null&&(fe[B1]=Q.MIN_EXT,fe[V1]=Q.MAX_EXT)}const Te={[aF]:t.ZERO,[oF]:t.ONE,[lF]:t.SRC_COLOR,[Vx]:t.SRC_ALPHA,[pF]:t.SRC_ALPHA_SATURATE,[hF]:t.DST_COLOR,[uF]:t.DST_ALPHA,[cF]:t.ONE_MINUS_SRC_COLOR,[Hx]:t.ONE_MINUS_SRC_ALPHA,[fF]:t.ONE_MINUS_DST_COLOR,[dF]:t.ONE_MINUS_DST_ALPHA,[mF]:t.CONSTANT_COLOR,[gF]:t.ONE_MINUS_CONSTANT_COLOR,[xF]:t.CONSTANT_ALPHA,[yF]:t.ONE_MINUS_CONSTANT_ALPHA};function he(Q,Le,Ie,ot,Me,Je,rt,Ot,Xt,It){if(Q===Ma){x===!0&&(ze(t.BLEND),x=!1);return}if(x===!1&&(it(t.BLEND),x=!0),Q!==iF){if(Q!==_||It!==V){if((S!==ho||C!==ho)&&(t.blendEquation(t.FUNC_ADD),S=ho,C=ho),It)switch(Q){case Wl:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case O1:t.blendFunc(t.ONE,t.ONE);break;case U1:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case z1:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Q);break}else switch(Q){case Wl:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case O1:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case U1:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case z1:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Q);break}M=null,E=null,N=null,D=null,R.set(0,0,0),k=0,_=Q,V=It}return}Me=Me||Le,Je=Je||Ie,rt=rt||ot,(Le!==S||Me!==C)&&(t.blendEquationSeparate(fe[Le],fe[Me]),S=Le,C=Me),(Ie!==M||ot!==E||Je!==N||rt!==D)&&(t.blendFuncSeparate(Te[Ie],Te[ot],Te[Je],Te[rt]),M=Ie,E=ot,N=Je,D=rt),(Ot.equals(R)===!1||Xt!==k)&&(t.blendColor(Ot.r,Ot.g,Ot.b,Xt),R.copy(Ot),k=Xt),_=Q,V=!1}function Qe(Q,Le){Q.side===js?ze(t.CULL_FACE):it(t.CULL_FACE);let Ie=Q.side===Vi;Le&&(Ie=!Ie),De(Ie),Q.blending===Wl&&Q.transparent===!1?he(Ma):he(Q.blending,Q.blendEquation,Q.blendSrc,Q.blendDst,Q.blendEquationAlpha,Q.blendSrcAlpha,Q.blendDstAlpha,Q.blendColor,Q.blendAlpha,Q.premultipliedAlpha),c.setFunc(Q.depthFunc),c.setTest(Q.depthTest),c.setMask(Q.depthWrite),o.setMask(Q.colorWrite);const ot=Q.stencilWrite;u.setTest(ot),ot&&(u.setMask(Q.stencilWriteMask),u.setFunc(Q.stencilFunc,Q.stencilRef,Q.stencilFuncMask),u.setOp(Q.stencilFail,Q.stencilZFail,Q.stencilZPass)),ne(Q.polygonOffset,Q.polygonOffsetFactor,Q.polygonOffsetUnits),Q.alphaToCoverage===!0?it(t.SAMPLE_ALPHA_TO_COVERAGE):ze(t.SAMPLE_ALPHA_TO_COVERAGE)}function De(Q){G!==Q&&(Q?t.frontFace(t.CW):t.frontFace(t.CCW),G=Q)}function O(Q){Q!==eF?(it(t.CULL_FACE),Q!==ie&&(Q===j1?t.cullFace(t.BACK):Q===tF?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):ze(t.CULL_FACE),ie=Q}function F(Q){Q!==z&&(L&&t.lineWidth(Q),z=Q)}function ne(Q,Le,Ie){Q?(it(t.POLYGON_OFFSET_FILL),($!==Le||X!==Ie)&&(t.polygonOffset(Le,Ie),$=Le,X=Ie)):ze(t.POLYGON_OFFSET_FILL)}function Se(Q){Q?it(t.SCISSOR_TEST):ze(t.SCISSOR_TEST)}function ve(Q){Q===void 0&&(Q=t.TEXTURE0+ee-1),Y!==Q&&(t.activeTexture(Q),Y=Q)}function we(Q,Le,Ie){Ie===void 0&&(Y===null?Ie=t.TEXTURE0+ee-1:Ie=Y);let ot=Z[Ie];ot===void 0&&(ot={type:void 0,texture:void 0},Z[Ie]=ot),(ot.type!==Q||ot.texture!==Le)&&(Y!==Ie&&(t.activeTexture(Ie),Y=Ie),t.bindTexture(Q,Le||nt[Q]),ot.type=Q,ot.texture=Le)}function $e(){const Q=Z[Y];Q!==void 0&&Q.type!==void 0&&(t.bindTexture(Q.type,null),Q.type=void 0,Q.texture=void 0)}function Pe(){try{t.compressedTexImage2D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function je(){try{t.compressedTexImage3D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function st(){try{t.texSubImage2D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function gt(){try{t.texSubImage3D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function be(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function Dt(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function St(){try{t.texStorage2D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function ut(){try{t.texStorage3D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function Ke(){try{t.texImage2D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function Ve(){try{t.texImage3D.apply(t,arguments)}catch(Q){console.error("THREE.WebGLState:",Q)}}function dt(Q){ge.equals(Q)===!1&&(t.scissor(Q.x,Q.y,Q.z,Q.w),ge.copy(Q))}function jt(Q){Ce.equals(Q)===!1&&(t.viewport(Q.x,Q.y,Q.z,Q.w),Ce.copy(Q))}function Jt(Q,Le){let Ie=p.get(Le);Ie===void 0&&(Ie=new WeakMap,p.set(Le,Ie));let ot=Ie.get(Q);ot===void 0&&(ot=t.getUniformBlockIndex(Le,Q.name),Ie.set(Q,ot))}function vt(Q,Le){const ot=p.get(Le).get(Q);f.get(Le)!==ot&&(t.uniformBlockBinding(Le,ot,Q.__bindingPointIndex),f.set(Le,ot))}function Re(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),i===!0&&(t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null)),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),m={},Y=null,Z={},g={},y=new WeakMap,b=[],w=null,x=!1,_=null,S=null,M=null,E=null,C=null,N=null,D=null,R=new Ue(0,0,0),k=0,V=!1,G=null,ie=null,z=null,$=null,X=null,ge.set(0,0,t.canvas.width,t.canvas.height),Ce.set(0,0,t.canvas.width,t.canvas.height),o.reset(),c.reset(),u.reset()}return{buffers:{color:o,depth:c,stencil:u},enable:it,disable:ze,bindFramebuffer:Xe,drawBuffers:q,useProgram:_e,setBlending:he,setMaterial:Qe,setFlipSided:De,setCullFace:O,setLineWidth:F,setPolygonOffset:ne,setScissorTest:Se,activeTexture:ve,bindTexture:we,unbindTexture:$e,compressedTexImage2D:Pe,compressedTexImage3D:je,texImage2D:Ke,texImage3D:Ve,updateUBOMapping:Jt,uniformBlockBinding:vt,texStorage2D:St,texStorage3D:ut,texSubImage2D:st,texSubImage3D:gt,compressedTexSubImage2D:be,compressedTexSubImage3D:Dt,scissor:dt,viewport:jt,reset:Re}}function OZ(t,e,n,i,r,s,a){const o=r.isWebGL2,c=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,u=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new WeakMap;let p;const m=new WeakMap;let g=!1;try{g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(O,F){return g?new OffscreenCanvas(O,F):Nf("canvas")}function b(O,F,ne,Se){let ve=1;if((O.width>Se||O.height>Se)&&(ve=Se/Math.max(O.width,O.height)),ve<1||F===!0)if(typeof HTMLImageElement<"u"&&O instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&O instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&O instanceof ImageBitmap){const we=F?qx:Math.floor,$e=we(ve*O.width),Pe=we(ve*O.height);p===void 0&&(p=y($e,Pe));const je=ne?y($e,Pe):p;return je.width=$e,je.height=Pe,je.getContext("2d").drawImage(O,0,0,$e,Pe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+O.width+"x"+O.height+") to ("+$e+"x"+Pe+")."),je}else return"data"in O&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+O.width+"x"+O.height+")."),O;return O}function w(O){return x_(O.width)&&x_(O.height)}function x(O){return o?!1:O.wrapS!==Ci||O.wrapT!==Ci||O.minFilter!==Ln&&O.minFilter!==jn}function _(O,F){return O.generateMipmaps&&F&&O.minFilter!==Ln&&O.minFilter!==jn}function S(O){t.generateMipmap(O)}function M(O,F,ne,Se,ve=!1){if(o===!1)return F;if(O!==null){if(t[O]!==void 0)return t[O];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+O+"'")}let we=F;if(F===t.RED&&(ne===t.FLOAT&&(we=t.R32F),ne===t.HALF_FLOAT&&(we=t.R16F),ne===t.UNSIGNED_BYTE&&(we=t.R8)),F===t.RED_INTEGER&&(ne===t.UNSIGNED_BYTE&&(we=t.R8UI),ne===t.UNSIGNED_SHORT&&(we=t.R16UI),ne===t.UNSIGNED_INT&&(we=t.R32UI),ne===t.BYTE&&(we=t.R8I),ne===t.SHORT&&(we=t.R16I),ne===t.INT&&(we=t.R32I)),F===t.RG&&(ne===t.FLOAT&&(we=t.RG32F),ne===t.HALF_FLOAT&&(we=t.RG16F),ne===t.UNSIGNED_BYTE&&(we=t.RG8)),F===t.RGBA){const $e=ve?Tf:$t.getTransfer(Se);ne===t.FLOAT&&(we=t.RGBA32F),ne===t.HALF_FLOAT&&(we=t.RGBA16F),ne===t.UNSIGNED_BYTE&&(we=$e===en?t.SRGB8_ALPHA8:t.RGBA8),ne===t.UNSIGNED_SHORT_4_4_4_4&&(we=t.RGBA4),ne===t.UNSIGNED_SHORT_5_5_5_1&&(we=t.RGB5_A1)}return(we===t.R16F||we===t.R32F||we===t.RG16F||we===t.RG32F||we===t.RGBA16F||we===t.RGBA32F)&&e.get("EXT_color_buffer_float"),we}function E(O,F,ne){return _(O,ne)===!0||O.isFramebufferTexture&&O.minFilter!==Ln&&O.minFilter!==jn?Math.log2(Math.max(F.width,F.height))+1:O.mipmaps!==void 0&&O.mipmaps.length>0?O.mipmaps.length:O.isCompressedTexture&&Array.isArray(O.image)?F.mipmaps.length:1}function C(O){return O===Ln||O===Wx||O===Fh?t.NEAREST:t.LINEAR}function N(O){const F=O.target;F.removeEventListener("dispose",N),R(F),F.isVideoTexture&&f.delete(F)}function D(O){const F=O.target;F.removeEventListener("dispose",D),V(F)}function R(O){const F=i.get(O);if(F.__webglInit===void 0)return;const ne=O.source,Se=m.get(ne);if(Se){const ve=Se[F.__cacheKey];ve.usedTimes--,ve.usedTimes===0&&k(O),Object.keys(Se).length===0&&m.delete(ne)}i.remove(O)}function k(O){const F=i.get(O);t.deleteTexture(F.__webglTexture);const ne=O.source,Se=m.get(ne);delete Se[F.__cacheKey],a.memory.textures--}function V(O){const F=O.texture,ne=i.get(O),Se=i.get(F);if(Se.__webglTexture!==void 0&&(t.deleteTexture(Se.__webglTexture),a.memory.textures--),O.depthTexture&&O.depthTexture.dispose(),O.isWebGLCubeRenderTarget)for(let ve=0;ve<6;ve++){if(Array.isArray(ne.__webglFramebuffer[ve]))for(let we=0;we<ne.__webglFramebuffer[ve].length;we++)t.deleteFramebuffer(ne.__webglFramebuffer[ve][we]);else t.deleteFramebuffer(ne.__webglFramebuffer[ve]);ne.__webglDepthbuffer&&t.deleteRenderbuffer(ne.__webglDepthbuffer[ve])}else{if(Array.isArray(ne.__webglFramebuffer))for(let ve=0;ve<ne.__webglFramebuffer.length;ve++)t.deleteFramebuffer(ne.__webglFramebuffer[ve]);else t.deleteFramebuffer(ne.__webglFramebuffer);if(ne.__webglDepthbuffer&&t.deleteRenderbuffer(ne.__webglDepthbuffer),ne.__webglMultisampledFramebuffer&&t.deleteFramebuffer(ne.__webglMultisampledFramebuffer),ne.__webglColorRenderbuffer)for(let ve=0;ve<ne.__webglColorRenderbuffer.length;ve++)ne.__webglColorRenderbuffer[ve]&&t.deleteRenderbuffer(ne.__webglColorRenderbuffer[ve]);ne.__webglDepthRenderbuffer&&t.deleteRenderbuffer(ne.__webglDepthRenderbuffer)}if(O.isWebGLMultipleRenderTargets)for(let ve=0,we=F.length;ve<we;ve++){const $e=i.get(F[ve]);$e.__webglTexture&&(t.deleteTexture($e.__webglTexture),a.memory.textures--),i.remove(F[ve])}i.remove(F),i.remove(O)}let G=0;function ie(){G=0}function z(){const O=G;return O>=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+O+" texture units while this GPU supports only "+r.maxTextures),G+=1,O}function $(O){const F=[];return F.push(O.wrapS),F.push(O.wrapT),F.push(O.wrapR||0),F.push(O.magFilter),F.push(O.minFilter),F.push(O.anisotropy),F.push(O.internalFormat),F.push(O.format),F.push(O.type),F.push(O.generateMipmaps),F.push(O.premultiplyAlpha),F.push(O.flipY),F.push(O.unpackAlignment),F.push(O.colorSpace),F.join()}function X(O,F){const ne=i.get(O);if(O.isVideoTexture&&Qe(O),O.isRenderTargetTexture===!1&&O.version>0&&ne.__version!==O.version){const Se=O.image;if(Se===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Se.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ge(ne,O,F);return}}n.bindTexture(t.TEXTURE_2D,ne.__webglTexture,t.TEXTURE0+F)}function ee(O,F){const ne=i.get(O);if(O.version>0&&ne.__version!==O.version){ge(ne,O,F);return}n.bindTexture(t.TEXTURE_2D_ARRAY,ne.__webglTexture,t.TEXTURE0+F)}function L(O,F){const ne=i.get(O);if(O.version>0&&ne.__version!==O.version){ge(ne,O,F);return}n.bindTexture(t.TEXTURE_3D,ne.__webglTexture,t.TEXTURE0+F)}function j(O,F){const ne=i.get(O);if(O.version>0&&ne.__version!==O.version){Ce(ne,O,F);return}n.bindTexture(t.TEXTURE_CUBE_MAP,ne.__webglTexture,t.TEXTURE0+F)}const B={[bf]:t.REPEAT,[Ci]:t.CLAMP_TO_EDGE,[_f]:t.MIRRORED_REPEAT},Y={[Ln]:t.NEAREST,[Wx]:t.NEAREST_MIPMAP_NEAREST,[Fh]:t.NEAREST_MIPMAP_LINEAR,[jn]:t.LINEAR,[PA]:t.LINEAR_MIPMAP_NEAREST,[Bo]:t.LINEAR_MIPMAP_LINEAR},Z={[$F]:t.NEVER,[ej]:t.ALWAYS,[YF]:t.LESS,[UA]:t.LEQUAL,[QF]:t.EQUAL,[JF]:t.GEQUAL,[KF]:t.GREATER,[ZF]:t.NOTEQUAL};function K(O,F,ne){if(ne?(t.texParameteri(O,t.TEXTURE_WRAP_S,B[F.wrapS]),t.texParameteri(O,t.TEXTURE_WRAP_T,B[F.wrapT]),(O===t.TEXTURE_3D||O===t.TEXTURE_2D_ARRAY)&&t.texParameteri(O,t.TEXTURE_WRAP_R,B[F.wrapR]),t.texParameteri(O,t.TEXTURE_MAG_FILTER,Y[F.magFilter]),t.texParameteri(O,t.TEXTURE_MIN_FILTER,Y[F.minFilter])):(t.texParameteri(O,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(O,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),(O===t.TEXTURE_3D||O===t.TEXTURE_2D_ARRAY)&&t.texParameteri(O,t.TEXTURE_WRAP_R,t.CLAMP_TO_EDGE),(F.wrapS!==Ci||F.wrapT!==Ci)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),t.texParameteri(O,t.TEXTURE_MAG_FILTER,C(F.magFilter)),t.texParameteri(O,t.TEXTURE_MIN_FILTER,C(F.minFilter)),F.minFilter!==Ln&&F.minFilter!==jn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),F.compareFunction&&(t.texParameteri(O,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(O,t.TEXTURE_COMPARE_FUNC,Z[F.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const Se=e.get("EXT_texture_filter_anisotropic");if(F.magFilter===Ln||F.minFilter!==Fh&&F.minFilter!==Bo||F.type===ds&&e.has("OES_texture_float_linear")===!1||o===!1&&F.type===td&&e.has("OES_texture_half_float_linear")===!1)return;(F.anisotropy>1||i.get(F).__currentAnisotropy)&&(t.texParameterf(O,Se.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(F.anisotropy,r.getMaxAnisotropy())),i.get(F).__currentAnisotropy=F.anisotropy)}}function se(O,F){let ne=!1;O.__webglInit===void 0&&(O.__webglInit=!0,F.addEventListener("dispose",N));const Se=F.source;let ve=m.get(Se);ve===void 0&&(ve={},m.set(Se,ve));const we=$(F);if(we!==O.__cacheKey){ve[we]===void 0&&(ve[we]={texture:t.createTexture(),usedTimes:0},a.memory.textures++,ne=!0),ve[we].usedTimes++;const $e=ve[O.__cacheKey];$e!==void 0&&(ve[O.__cacheKey].usedTimes--,$e.usedTimes===0&&k(F)),O.__cacheKey=we,O.__webglTexture=ve[we].texture}return ne}function ge(O,F,ne){let Se=t.TEXTURE_2D;(F.isDataArrayTexture||F.isCompressedArrayTexture)&&(Se=t.TEXTURE_2D_ARRAY),F.isData3DTexture&&(Se=t.TEXTURE_3D);const ve=se(O,F),we=F.source;n.bindTexture(Se,O.__webglTexture,t.TEXTURE0+ne);const $e=i.get(we);if(we.version!==$e.__version||ve===!0){n.activeTexture(t.TEXTURE0+ne);const Pe=$t.getPrimaries($t.workingColorSpace),je=F.colorSpace===xr?null:$t.getPrimaries(F.colorSpace),st=F.colorSpace===xr||Pe===je?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,F.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,F.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,st);const gt=x(F)&&w(F.image)===!1;let be=b(F.image,gt,!1,r.maxTextureSize);be=De(F,be);const Dt=w(be)||o,St=s.convert(F.format,F.colorSpace);let ut=s.convert(F.type),Ke=M(F.internalFormat,St,ut,F.colorSpace,F.isVideoTexture);K(Se,F,Dt);let Ve;const dt=F.mipmaps,jt=o&&F.isVideoTexture!==!0&&Ke!==FA,Jt=$e.__version===void 0||ve===!0,vt=E(F,be,Dt);if(F.isDepthTexture)Ke=t.DEPTH_COMPONENT,o?F.type===ds?Ke=t.DEPTH_COMPONENT32F:F.type===wa?Ke=t.DEPTH_COMPONENT24:F.type===No?Ke=t.DEPTH24_STENCIL8:Ke=t.DEPTH_COMPONENT16:F.type===ds&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),F.format===Ro&&Ke===t.DEPTH_COMPONENT&&F.type!==jy&&F.type!==wa&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),F.type=wa,ut=s.convert(F.type)),F.format===rc&&Ke===t.DEPTH_COMPONENT&&(Ke=t.DEPTH_STENCIL,F.type!==No&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),F.type=No,ut=s.convert(F.type))),Jt&&(jt?n.texStorage2D(t.TEXTURE_2D,1,Ke,be.width,be.height):n.texImage2D(t.TEXTURE_2D,0,Ke,be.width,be.height,0,St,ut,null));else if(F.isDataTexture)if(dt.length>0&&Dt){jt&&Jt&&n.texStorage2D(t.TEXTURE_2D,vt,Ke,dt[0].width,dt[0].height);for(let Re=0,Q=dt.length;Re<Q;Re++)Ve=dt[Re],jt?n.texSubImage2D(t.TEXTURE_2D,Re,0,0,Ve.width,Ve.height,St,ut,Ve.data):n.texImage2D(t.TEXTURE_2D,Re,Ke,Ve.width,Ve.height,0,St,ut,Ve.data);F.generateMipmaps=!1}else jt?(Jt&&n.texStorage2D(t.TEXTURE_2D,vt,Ke,be.width,be.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,be.width,be.height,St,ut,be.data)):n.texImage2D(t.TEXTURE_2D,0,Ke,be.width,be.height,0,St,ut,be.data);else if(F.isCompressedTexture)if(F.isCompressedArrayTexture){jt&&Jt&&n.texStorage3D(t.TEXTURE_2D_ARRAY,vt,Ke,dt[0].width,dt[0].height,be.depth);for(let Re=0,Q=dt.length;Re<Q;Re++)Ve=dt[Re],F.format!==zi?St!==null?jt?n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,Re,0,0,0,Ve.width,Ve.height,be.depth,St,Ve.data,0,0):n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,Re,Ke,Ve.width,Ve.height,be.depth,0,Ve.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):jt?n.texSubImage3D(t.TEXTURE_2D_ARRAY,Re,0,0,0,Ve.width,Ve.height,be.depth,St,ut,Ve.data):n.texImage3D(t.TEXTURE_2D_ARRAY,Re,Ke,Ve.width,Ve.height,be.depth,0,St,ut,Ve.data)}else{jt&&Jt&&n.texStorage2D(t.TEXTURE_2D,vt,Ke,dt[0].width,dt[0].height);for(let Re=0,Q=dt.length;Re<Q;Re++)Ve=dt[Re],F.format!==zi?St!==null?jt?n.compressedTexSubImage2D(t.TEXTURE_2D,Re,0,0,Ve.width,Ve.height,St,Ve.data):n.compressedTexImage2D(t.TEXTURE_2D,Re,Ke,Ve.width,Ve.height,0,Ve.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):jt?n.texSubImage2D(t.TEXTURE_2D,Re,0,0,Ve.width,Ve.height,St,ut,Ve.data):n.texImage2D(t.TEXTURE_2D,Re,Ke,Ve.width,Ve.height,0,St,ut,Ve.data)}else if(F.isDataArrayTexture)jt?(Jt&&n.texStorage3D(t.TEXTURE_2D_ARRAY,vt,Ke,be.width,be.height,be.depth),n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,be.width,be.height,be.depth,St,ut,be.data)):n.texImage3D(t.TEXTURE_2D_ARRAY,0,Ke,be.width,be.height,be.depth,0,St,ut,be.data);else if(F.isData3DTexture)jt?(Jt&&n.texStorage3D(t.TEXTURE_3D,vt,Ke,be.width,be.height,be.depth),n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,be.width,be.height,be.depth,St,ut,be.data)):n.texImage3D(t.TEXTURE_3D,0,Ke,be.width,be.height,be.depth,0,St,ut,be.data);else if(F.isFramebufferTexture){if(Jt)if(jt)n.texStorage2D(t.TEXTURE_2D,vt,Ke,be.width,be.height);else{let Re=be.width,Q=be.height;for(let Le=0;Le<vt;Le++)n.texImage2D(t.TEXTURE_2D,Le,Ke,Re,Q,0,St,ut,null),Re>>=1,Q>>=1}}else if(dt.length>0&&Dt){jt&&Jt&&n.texStorage2D(t.TEXTURE_2D,vt,Ke,dt[0].width,dt[0].height);for(let Re=0,Q=dt.length;Re<Q;Re++)Ve=dt[Re],jt?n.texSubImage2D(t.TEXTURE_2D,Re,0,0,St,ut,Ve):n.texImage2D(t.TEXTURE_2D,Re,Ke,St,ut,Ve);F.generateMipmaps=!1}else jt?(Jt&&n.texStorage2D(t.TEXTURE_2D,vt,Ke,be.width,be.height),n.texSubImage2D(t.TEXTURE_2D,0,0,0,St,ut,be)):n.texImage2D(t.TEXTURE_2D,0,Ke,St,ut,be);_(F,Dt)&&S(Se),$e.__version=we.version,F.onUpdate&&F.onUpdate(F)}O.__version=F.version}function Ce(O,F,ne){if(F.image.length!==6)return;const Se=se(O,F),ve=F.source;n.bindTexture(t.TEXTURE_CUBE_MAP,O.__webglTexture,t.TEXTURE0+ne);const we=i.get(ve);if(ve.version!==we.__version||Se===!0){n.activeTexture(t.TEXTURE0+ne);const $e=$t.getPrimaries($t.workingColorSpace),Pe=F.colorSpace===xr?null:$t.getPrimaries(F.colorSpace),je=F.colorSpace===xr||$e===Pe?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,F.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,F.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,F.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,je);const st=F.isCompressedTexture||F.image[0].isCompressedTexture,gt=F.image[0]&&F.image[0].isDataTexture,be=[];for(let Re=0;Re<6;Re++)!st&&!gt?be[Re]=b(F.image[Re],!1,!0,r.maxCubemapSize):be[Re]=gt?F.image[Re].image:F.image[Re],be[Re]=De(F,be[Re]);const Dt=be[0],St=w(Dt)||o,ut=s.convert(F.format,F.colorSpace),Ke=s.convert(F.type),Ve=M(F.internalFormat,ut,Ke,F.colorSpace),dt=o&&F.isVideoTexture!==!0,jt=we.__version===void 0||Se===!0;let Jt=E(F,Dt,St);K(t.TEXTURE_CUBE_MAP,F,St);let vt;if(st){dt&&jt&&n.texStorage2D(t.TEXTURE_CUBE_MAP,Jt,Ve,Dt.width,Dt.height);for(let Re=0;Re<6;Re++){vt=be[Re].mipmaps;for(let Q=0;Q<vt.length;Q++){const Le=vt[Q];F.format!==zi?ut!==null?dt?n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q,0,0,Le.width,Le.height,ut,Le.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q,Ve,Le.width,Le.height,0,Le.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):dt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q,0,0,Le.width,Le.height,ut,Ke,Le.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q,Ve,Le.width,Le.height,0,ut,Ke,Le.data)}}}else{vt=F.mipmaps,dt&&jt&&(vt.length>0&&Jt++,n.texStorage2D(t.TEXTURE_CUBE_MAP,Jt,Ve,be[0].width,be[0].height));for(let Re=0;Re<6;Re++)if(gt){dt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,0,0,be[Re].width,be[Re].height,ut,Ke,be[Re].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,Ve,be[Re].width,be[Re].height,0,ut,Ke,be[Re].data);for(let Q=0;Q<vt.length;Q++){const Ie=vt[Q].image[Re].image;dt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q+1,0,0,Ie.width,Ie.height,ut,Ke,Ie.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q+1,Ve,Ie.width,Ie.height,0,ut,Ke,Ie.data)}}else{dt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,0,0,ut,Ke,be[Re]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,0,Ve,ut,Ke,be[Re]);for(let Q=0;Q<vt.length;Q++){const Le=vt[Q];dt?n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q+1,0,0,ut,Ke,Le.image[Re]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+Re,Q+1,Ve,ut,Ke,Le.image[Re])}}}_(F,St)&&S(t.TEXTURE_CUBE_MAP),we.__version=ve.version,F.onUpdate&&F.onUpdate(F)}O.__version=F.version}function xe(O,F,ne,Se,ve,we){const $e=s.convert(ne.format,ne.colorSpace),Pe=s.convert(ne.type),je=M(ne.internalFormat,$e,Pe,ne.colorSpace);if(!i.get(F).__hasExternalTextures){const gt=Math.max(1,F.width>>we),be=Math.max(1,F.height>>we);ve===t.TEXTURE_3D||ve===t.TEXTURE_2D_ARRAY?n.texImage3D(ve,we,je,gt,be,F.depth,0,$e,Pe,null):n.texImage2D(ve,we,je,gt,be,0,$e,Pe,null)}n.bindFramebuffer(t.FRAMEBUFFER,O),he(F)?c.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Se,ve,i.get(ne).__webglTexture,0,Te(F)):(ve===t.TEXTURE_2D||ve>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&ve<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Se,ve,i.get(ne).__webglTexture,we),n.bindFramebuffer(t.FRAMEBUFFER,null)}function nt(O,F,ne){if(t.bindRenderbuffer(t.RENDERBUFFER,O),F.depthBuffer&&!F.stencilBuffer){let Se=o===!0?t.DEPTH_COMPONENT24:t.DEPTH_COMPONENT16;if(ne||he(F)){const ve=F.depthTexture;ve&&ve.isDepthTexture&&(ve.type===ds?Se=t.DEPTH_COMPONENT32F:ve.type===wa&&(Se=t.DEPTH_COMPONENT24));const we=Te(F);he(F)?c.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,we,Se,F.width,F.height):t.renderbufferStorageMultisample(t.RENDERBUFFER,we,Se,F.width,F.height)}else t.renderbufferStorage(t.RENDERBUFFER,Se,F.width,F.height);t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,O)}else if(F.depthBuffer&&F.stencilBuffer){const Se=Te(F);ne&&he(F)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,Se,t.DEPTH24_STENCIL8,F.width,F.height):he(F)?c.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,Se,t.DEPTH24_STENCIL8,F.width,F.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,F.width,F.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,O)}else{const Se=F.isWebGLMultipleRenderTargets===!0?F.texture:[F.texture];for(let ve=0;ve<Se.length;ve++){const we=Se[ve],$e=s.convert(we.format,we.colorSpace),Pe=s.convert(we.type),je=M(we.internalFormat,$e,Pe,we.colorSpace),st=Te(F);ne&&he(F)===!1?t.renderbufferStorageMultisample(t.RENDERBUFFER,st,je,F.width,F.height):he(F)?c.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,st,je,F.width,F.height):t.renderbufferStorage(t.RENDERBUFFER,je,F.width,F.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function it(O,F){if(F&&F.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,O),!(F.depthTexture&&F.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(F.depthTexture).__webglTexture||F.depthTexture.image.width!==F.width||F.depthTexture.image.height!==F.height)&&(F.depthTexture.image.width=F.width,F.depthTexture.image.height=F.height,F.depthTexture.needsUpdate=!0),X(F.depthTexture,0);const Se=i.get(F.depthTexture).__webglTexture,ve=Te(F);if(F.depthTexture.format===Ro)he(F)?c.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Se,0,ve):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,Se,0);else if(F.depthTexture.format===rc)he(F)?c.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Se,0,ve):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,Se,0);else throw new Error("Unknown depthTexture format")}function ze(O){const F=i.get(O),ne=O.isWebGLCubeRenderTarget===!0;if(O.depthTexture&&!F.__autoAllocateDepthBuffer){if(ne)throw new Error("target.depthTexture not supported in Cube render targets");it(F.__webglFramebuffer,O)}else if(ne){F.__webglDepthbuffer=[];for(let Se=0;Se<6;Se++)n.bindFramebuffer(t.FRAMEBUFFER,F.__webglFramebuffer[Se]),F.__webglDepthbuffer[Se]=t.createRenderbuffer(),nt(F.__webglDepthbuffer[Se],O,!1)}else n.bindFramebuffer(t.FRAMEBUFFER,F.__webglFramebuffer),F.__webglDepthbuffer=t.createRenderbuffer(),nt(F.__webglDepthbuffer,O,!1);n.bindFramebuffer(t.FRAMEBUFFER,null)}function Xe(O,F,ne){const Se=i.get(O);F!==void 0&&xe(Se.__webglFramebuffer,O,O.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),ne!==void 0&&ze(O)}function q(O){const F=O.texture,ne=i.get(O),Se=i.get(F);O.addEventListener("dispose",D),O.isWebGLMultipleRenderTargets!==!0&&(Se.__webglTexture===void 0&&(Se.__webglTexture=t.createTexture()),Se.__version=F.version,a.memory.textures++);const ve=O.isWebGLCubeRenderTarget===!0,we=O.isWebGLMultipleRenderTargets===!0,$e=w(O)||o;if(ve){ne.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(o&&F.mipmaps&&F.mipmaps.length>0){ne.__webglFramebuffer[Pe]=[];for(let je=0;je<F.mipmaps.length;je++)ne.__webglFramebuffer[Pe][je]=t.createFramebuffer()}else ne.__webglFramebuffer[Pe]=t.createFramebuffer()}else{if(o&&F.mipmaps&&F.mipmaps.length>0){ne.__webglFramebuffer=[];for(let Pe=0;Pe<F.mipmaps.length;Pe++)ne.__webglFramebuffer[Pe]=t.createFramebuffer()}else ne.__webglFramebuffer=t.createFramebuffer();if(we)if(r.drawBuffers){const Pe=O.texture;for(let je=0,st=Pe.length;je<st;je++){const gt=i.get(Pe[je]);gt.__webglTexture===void 0&&(gt.__webglTexture=t.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(o&&O.samples>0&&he(O)===!1){const Pe=we?F:[F];ne.__webglMultisampledFramebuffer=t.createFramebuffer(),ne.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let je=0;je<Pe.length;je++){const st=Pe[je];ne.__webglColorRenderbuffer[je]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,ne.__webglColorRenderbuffer[je]);const gt=s.convert(st.format,st.colorSpace),be=s.convert(st.type),Dt=M(st.internalFormat,gt,be,st.colorSpace,O.isXRRenderTarget===!0),St=Te(O);t.renderbufferStorageMultisample(t.RENDERBUFFER,St,Dt,O.width,O.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+je,t.RENDERBUFFER,ne.__webglColorRenderbuffer[je])}t.bindRenderbuffer(t.RENDERBUFFER,null),O.depthBuffer&&(ne.__webglDepthRenderbuffer=t.createRenderbuffer(),nt(ne.__webglDepthRenderbuffer,O,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(ve){n.bindTexture(t.TEXTURE_CUBE_MAP,Se.__webglTexture),K(t.TEXTURE_CUBE_MAP,F,$e);for(let Pe=0;Pe<6;Pe++)if(o&&F.mipmaps&&F.mipmaps.length>0)for(let je=0;je<F.mipmaps.length;je++)xe(ne.__webglFramebuffer[Pe][je],O,F,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,je);else xe(ne.__webglFramebuffer[Pe],O,F,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+Pe,0);_(F,$e)&&S(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(we){const Pe=O.texture;for(let je=0,st=Pe.length;je<st;je++){const gt=Pe[je],be=i.get(gt);n.bindTexture(t.TEXTURE_2D,be.__webglTexture),K(t.TEXTURE_2D,gt,$e),xe(ne.__webglFramebuffer,O,gt,t.COLOR_ATTACHMENT0+je,t.TEXTURE_2D,0),_(gt,$e)&&S(t.TEXTURE_2D)}n.unbindTexture()}else{let Pe=t.TEXTURE_2D;if((O.isWebGL3DRenderTarget||O.isWebGLArrayRenderTarget)&&(o?Pe=O.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(Pe,Se.__webglTexture),K(Pe,F,$e),o&&F.mipmaps&&F.mipmaps.length>0)for(let je=0;je<F.mipmaps.length;je++)xe(ne.__webglFramebuffer[je],O,F,t.COLOR_ATTACHMENT0,Pe,je);else xe(ne.__webglFramebuffer,O,F,t.COLOR_ATTACHMENT0,Pe,0);_(F,$e)&&S(Pe),n.unbindTexture()}O.depthBuffer&&ze(O)}function _e(O){const F=w(O)||o,ne=O.isWebGLMultipleRenderTargets===!0?O.texture:[O.texture];for(let Se=0,ve=ne.length;Se<ve;Se++){const we=ne[Se];if(_(we,F)){const $e=O.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,Pe=i.get(we).__webglTexture;n.bindTexture($e,Pe),S($e),n.unbindTexture()}}}function fe(O){if(o&&O.samples>0&&he(O)===!1){const F=O.isWebGLMultipleRenderTargets?O.texture:[O.texture],ne=O.width,Se=O.height;let ve=t.COLOR_BUFFER_BIT;const we=[],$e=O.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Pe=i.get(O),je=O.isWebGLMultipleRenderTargets===!0;if(je)for(let st=0;st<F.length;st++)n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+st,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+st,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,Pe.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Pe.__webglFramebuffer);for(let st=0;st<F.length;st++){we.push(t.COLOR_ATTACHMENT0+st),O.depthBuffer&&we.push($e);const gt=Pe.__ignoreDepthValues!==void 0?Pe.__ignoreDepthValues:!1;if(gt===!1&&(O.depthBuffer&&(ve|=t.DEPTH_BUFFER_BIT),O.stencilBuffer&&(ve|=t.STENCIL_BUFFER_BIT)),je&&t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,Pe.__webglColorRenderbuffer[st]),gt===!0&&(t.invalidateFramebuffer(t.READ_FRAMEBUFFER,[$e]),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[$e])),je){const be=i.get(F[st]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,be,0)}t.blitFramebuffer(0,0,ne,Se,0,0,ne,Se,ve,t.NEAREST),u&&t.invalidateFramebuffer(t.READ_FRAMEBUFFER,we)}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),je)for(let st=0;st<F.length;st++){n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+st,t.RENDERBUFFER,Pe.__webglColorRenderbuffer[st]);const gt=i.get(F[st]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,Pe.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+st,t.TEXTURE_2D,gt,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,Pe.__webglMultisampledFramebuffer)}}function Te(O){return Math.min(r.maxSamples,O.samples)}function he(O){const F=i.get(O);return o&&O.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&F.__useRenderToTexture!==!1}function Qe(O){const F=a.render.frame;f.get(O)!==F&&(f.set(O,F),O.update())}function De(O,F){const ne=O.colorSpace,Se=O.format,ve=O.type;return O.isCompressedTexture===!0||O.isVideoTexture===!0||O.format===Gx||ne!==Ys&&ne!==xr&&($t.getTransfer(ne)===en?o===!1?e.has("EXT_sRGB")===!0&&Se===zi?(O.format=Gx,O.minFilter=jn,O.generateMipmaps=!1):F=BA.sRGBToLinear(F):(Se!==zi||ve!==Gs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),F}this.allocateTextureUnit=z,this.resetTextureUnits=ie,this.setTexture2D=X,this.setTexture2DArray=ee,this.setTexture3D=L,this.setTextureCube=j,this.rebindTextures=Xe,this.setupRenderTarget=q,this.updateRenderTargetMipmap=_e,this.updateMultisampleRenderTarget=fe,this.setupDepthRenderbuffer=ze,this.setupFrameBufferTexture=xe,this.useMultisampledRTT=he}function mj(t,e,n){const i=n.isWebGL2;function r(s,a=xr){let o;const c=$t.getTransfer(a);if(s===Gs)return t.UNSIGNED_BYTE;if(s===RA)return t.UNSIGNED_SHORT_4_4_4_4;if(s===IA)return t.UNSIGNED_SHORT_5_5_5_1;if(s===LF)return t.BYTE;if(s===DF)return t.SHORT;if(s===jy)return t.UNSIGNED_SHORT;if(s===NA)return t.INT;if(s===wa)return t.UNSIGNED_INT;if(s===ds)return t.FLOAT;if(s===td)return i?t.HALF_FLOAT:(o=e.get("OES_texture_half_float"),o!==null?o.HALF_FLOAT_OES:null);if(s===FF)return t.ALPHA;if(s===zi)return t.RGBA;if(s===jF)return t.LUMINANCE;if(s===OF)return t.LUMINANCE_ALPHA;if(s===Ro)return t.DEPTH_COMPONENT;if(s===rc)return t.DEPTH_STENCIL;if(s===Gx)return o=e.get("EXT_sRGB"),o!==null?o.SRGB_ALPHA_EXT:null;if(s===UF)return t.RED;if(s===kA)return t.RED_INTEGER;if(s===zF)return t.RG;if(s===LA)return t.RG_INTEGER;if(s===DA)return t.RGBA_INTEGER;if(s===Qg||s===Kg||s===Zg||s===Jg)if(c===en)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(s===Qg)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===Kg)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===Zg)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===Jg)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(s===Qg)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===Kg)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===Zg)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===Jg)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===W1||s===G1||s===q1||s===X1)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(s===W1)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===G1)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===q1)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===X1)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===FA)return o=e.get("WEBGL_compressed_texture_etc1"),o!==null?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===$1||s===Y1)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(s===$1)return c===en?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(s===Y1)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Q1||s===K1||s===Z1||s===J1||s===e_||s===t_||s===n_||s===i_||s===r_||s===s_||s===a_||s===o_||s===l_||s===c_)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(s===Q1)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===K1)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Z1)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===J1)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===e_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===t_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===n_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===i_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===r_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===s_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===a_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===o_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===l_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===c_)return c===en?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===ex||s===u_||s===d_)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(s===ex)return c===en?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(s===u_)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(s===d_)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(s===BF||s===h_||s===f_||s===p_)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(s===ex)return o.COMPRESSED_RED_RGTC1_EXT;if(s===h_)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===f_)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===p_)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===No?i?t.UNSIGNED_INT_24_8:(o=e.get("WEBGL_depth_texture"),o!==null?o.UNSIGNED_INT_24_8_WEBGL:null):t[s]!==void 0?t[s]:null}return{convert:r}}class gj extends si{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Su extends Gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const UZ={type:"move"};class Fw{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Su,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Su,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new H,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new H),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Su,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new H,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new H),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let r=null,s=null,a=null;const o=this._targetRay,c=this._grip,u=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(u&&e.hand){a=!0;for(const b of e.hand.values()){const w=n.getJointPose(b,i),x=this._getHandJoint(u,b);w!==null&&(x.matrix.fromArray(w.transform.matrix),x.matrix.decompose(x.position,x.rotation,x.scale),x.matrixWorldNeedsUpdate=!0,x.jointRadius=w.radius),x.visible=w!==null}const f=u.joints["index-finger-tip"],p=u.joints["thumb-tip"],m=f.position.distanceTo(p.position),g=.02,y=.005;u.inputState.pinching&&m>g+y?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&m<=g-y&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(s=n.getPose(e.gripSpace,i),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.hasAngularVelocity=!1));o!==null&&(r=n.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(UZ)))}return o!==null&&(o.visible=r!==null),c!==null&&(c.visible=s!==null),u!==null&&(u.visible=a!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new Su;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}class zZ extends Oa{constructor(e,n){super();const i=this;let r=null,s=1,a=null,o="local-floor",c=1,u=null,f=null,p=null,m=null,g=null,y=null;const b=n.getContextAttributes();let w=null,x=null;const _=[],S=[],M=new ye;let E=null;const C=new si;C.layers.enable(1),C.viewport=new Yt;const N=new si;N.layers.enable(2),N.viewport=new Yt;const D=[C,N],R=new gj;R.layers.enable(1),R.layers.enable(2);let k=null,V=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(K){let se=_[K];return se===void 0&&(se=new Fw,_[K]=se),se.getTargetRaySpace()},this.getControllerGrip=function(K){let se=_[K];return se===void 0&&(se=new Fw,_[K]=se),se.getGripSpace()},this.getHand=function(K){let se=_[K];return se===void 0&&(se=new Fw,_[K]=se),se.getHandSpace()};function G(K){const se=S.indexOf(K.inputSource);if(se===-1)return;const ge=_[se];ge!==void 0&&(ge.update(K.inputSource,K.frame,u||a),ge.dispatchEvent({type:K.type,data:K.inputSource}))}function ie(){r.removeEventListener("select",G),r.removeEventListener("selectstart",G),r.removeEventListener("selectend",G),r.removeEventListener("squeeze",G),r.removeEventListener("squeezestart",G),r.removeEventListener("squeezeend",G),r.removeEventListener("end",ie),r.removeEventListener("inputsourceschange",z);for(let K=0;K<_.length;K++){const se=S[K];se!==null&&(S[K]=null,_[K].disconnect(se))}k=null,V=null,e.setRenderTarget(w),g=null,m=null,p=null,r=null,x=null,Z.stop(),i.isPresenting=!1,e.setPixelRatio(E),e.setSize(M.width,M.height,!1),i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(K){s=K,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(K){o=K,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||a},this.setReferenceSpace=function(K){u=K},this.getBaseLayer=function(){return m!==null?m:g},this.getBinding=function(){return p},this.getFrame=function(){return y},this.getSession=function(){return r},this.setSession=async function(K){if(r=K,r!==null){if(w=e.getRenderTarget(),r.addEventListener("select",G),r.addEventListener("selectstart",G),r.addEventListener("selectend",G),r.addEventListener("squeeze",G),r.addEventListener("squeezestart",G),r.addEventListener("squeezeend",G),r.addEventListener("end",ie),r.addEventListener("inputsourceschange",z),b.xrCompatible!==!0&&await n.makeXRCompatible(),E=e.getPixelRatio(),e.getSize(M),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const se={antialias:r.renderState.layers===void 0?b.antialias:!0,alpha:!0,depth:b.depth,stencil:b.stencil,framebufferScaleFactor:s};g=new XRWebGLLayer(r,n,se),r.updateRenderState({baseLayer:g}),e.setPixelRatio(1),e.setSize(g.framebufferWidth,g.framebufferHeight,!1),x=new ys(g.framebufferWidth,g.framebufferHeight,{format:zi,type:Gs,colorSpace:e.outputColorSpace,stencilBuffer:b.stencil})}else{let se=null,ge=null,Ce=null;b.depth&&(Ce=b.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,se=b.stencil?rc:Ro,ge=b.stencil?No:wa);const xe={colorFormat:n.RGBA8,depthFormat:Ce,scaleFactor:s};p=new XRWebGLBinding(r,n),m=p.createProjectionLayer(xe),r.updateRenderState({layers:[m]}),e.setPixelRatio(1),e.setSize(m.textureWidth,m.textureHeight,!1),x=new ys(m.textureWidth,m.textureHeight,{format:zi,type:Gs,depthTexture:new qA(m.textureWidth,m.textureHeight,ge,void 0,void 0,void 0,void 0,void 0,void 0,se),stencilBuffer:b.stencil,colorSpace:e.outputColorSpace,samples:b.antialias?4:0});const nt=e.properties.get(x);nt.__ignoreDepthValues=m.ignoreDepthValues}x.isXRRenderTarget=!0,this.setFoveation(c),u=null,a=await r.requestReferenceSpace(o),Z.setContext(r),Z.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(r!==null)return r.environmentBlendMode};function z(K){for(let se=0;se<K.removed.length;se++){const ge=K.removed[se],Ce=S.indexOf(ge);Ce>=0&&(S[Ce]=null,_[Ce].disconnect(ge))}for(let se=0;se<K.added.length;se++){const ge=K.added[se];let Ce=S.indexOf(ge);if(Ce===-1){for(let nt=0;nt<_.length;nt++)if(nt>=S.length){S.push(ge),Ce=nt;break}else if(S[nt]===null){S[nt]=ge,Ce=nt;break}if(Ce===-1)break}const xe=_[Ce];xe&&xe.connect(ge)}}const $=new H,X=new H;function ee(K,se,ge){$.setFromMatrixPosition(se.matrixWorld),X.setFromMatrixPosition(ge.matrixWorld);const Ce=$.distanceTo(X),xe=se.projectionMatrix.elements,nt=ge.projectionMatrix.elements,it=xe[14]/(xe[10]-1),ze=xe[14]/(xe[10]+1),Xe=(xe[9]+1)/xe[5],q=(xe[9]-1)/xe[5],_e=(xe[8]-1)/xe[0],fe=(nt[8]+1)/nt[0],Te=it*_e,he=it*fe,Qe=Ce/(-_e+fe),De=Qe*-_e;se.matrixWorld.decompose(K.position,K.quaternion,K.scale),K.translateX(De),K.translateZ(Qe),K.matrixWorld.compose(K.position,K.quaternion,K.scale),K.matrixWorldInverse.copy(K.matrixWorld).invert();const O=it+Qe,F=ze+Qe,ne=Te-De,Se=he+(Ce-De),ve=Xe*ze/F*O,we=q*ze/F*O;K.projectionMatrix.makePerspective(ne,Se,ve,we,O,F),K.projectionMatrixInverse.copy(K.projectionMatrix).invert()}function L(K,se){se===null?K.matrixWorld.copy(K.matrix):K.matrixWorld.multiplyMatrices(se.matrixWorld,K.matrix),K.matrixWorldInverse.copy(K.matrixWorld).invert()}this.updateCamera=function(K){if(r===null)return;R.near=N.near=C.near=K.near,R.far=N.far=C.far=K.far,(k!==R.near||V!==R.far)&&(r.updateRenderState({depthNear:R.near,depthFar:R.far}),k=R.near,V=R.far);const se=K.parent,ge=R.cameras;L(R,se);for(let Ce=0;Ce<ge.length;Ce++)L(ge[Ce],se);ge.length===2?ee(R,C,N):R.projectionMatrix.copy(C.projectionMatrix),j(K,R,se)};function j(K,se,ge){ge===null?K.matrix.copy(se.matrixWorld):(K.matrix.copy(ge.matrixWorld),K.matrix.invert(),K.matrix.multiply(se.matrixWorld)),K.matrix.decompose(K.position,K.quaternion,K.scale),K.updateMatrixWorld(!0),K.projectionMatrix.copy(se.projectionMatrix),K.projectionMatrixInverse.copy(se.projectionMatrixInverse),K.isPerspectiveCamera&&(K.fov=id*2*Math.atan(1/K.projectionMatrix.elements[5]),K.zoom=1)}this.getCamera=function(){return R},this.getFoveation=function(){if(!(m===null&&g===null))return c},this.setFoveation=function(K){c=K,m!==null&&(m.fixedFoveation=K),g!==null&&g.fixedFoveation!==void 0&&(g.fixedFoveation=K)};let B=null;function Y(K,se){if(f=se.getViewerPose(u||a),y=se,f!==null){const ge=f.views;g!==null&&(e.setRenderTargetFramebuffer(x,g.framebuffer),e.setRenderTarget(x));let Ce=!1;ge.length!==R.cameras.length&&(R.cameras.length=0,Ce=!0);for(let xe=0;xe<ge.length;xe++){const nt=ge[xe];let it=null;if(g!==null)it=g.getViewport(nt);else{const Xe=p.getViewSubImage(m,nt);it=Xe.viewport,xe===0&&(e.setRenderTargetTextures(x,Xe.colorTexture,m.ignoreDepthValues?void 0:Xe.depthStencilTexture),e.setRenderTarget(x))}let ze=D[xe];ze===void 0&&(ze=new si,ze.layers.enable(xe),ze.viewport=new Yt,D[xe]=ze),ze.matrix.fromArray(nt.transform.matrix),ze.matrix.decompose(ze.position,ze.quaternion,ze.scale),ze.projectionMatrix.fromArray(nt.projectionMatrix),ze.projectionMatrixInverse.copy(ze.projectionMatrix).invert(),ze.viewport.set(it.x,it.y,it.width,it.height),xe===0&&(R.matrix.copy(ze.matrix),R.matrix.decompose(R.position,R.quaternion,R.scale)),Ce===!0&&R.cameras.push(ze)}}for(let ge=0;ge<_.length;ge++){const Ce=S[ge],xe=_[ge];Ce!==null&&xe!==void 0&&xe.update(Ce,se,u||a)}B&&B(K,se),se.detectedPlanes&&i.dispatchEvent({type:"planesdetected",data:se}),y=null}const Z=new cj;Z.setAnimationLoop(Y),this.setAnimationLoop=function(K){B=K},this.dispose=function(){}}}function BZ(t,e){function n(w,x){w.matrixAutoUpdate===!0&&w.updateMatrix(),x.value.copy(w.matrix)}function i(w,x){x.color.getRGB(w.fogColor.value,sj(t)),x.isFog?(w.fogNear.value=x.near,w.fogFar.value=x.far):x.isFogExp2&&(w.fogDensity.value=x.density)}function r(w,x,_,S,M){x.isMeshBasicMaterial||x.isMeshLambertMaterial?s(w,x):x.isMeshToonMaterial?(s(w,x),p(w,x)):x.isMeshPhongMaterial?(s(w,x),f(w,x)):x.isMeshStandardMaterial?(s(w,x),m(w,x),x.isMeshPhysicalMaterial&&g(w,x,M)):x.isMeshMatcapMaterial?(s(w,x),y(w,x)):x.isMeshDepthMaterial?s(w,x):x.isMeshDistanceMaterial?(s(w,x),b(w,x)):x.isMeshNormalMaterial?s(w,x):x.isLineBasicMaterial?(a(w,x),x.isLineDashedMaterial&&o(w,x)):x.isPointsMaterial?c(w,x,_,S):x.isSpriteMaterial?u(w,x):x.isShadowMaterial?(w.color.value.copy(x.color),w.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function s(w,x){w.opacity.value=x.opacity,x.color&&w.diffuse.value.copy(x.color),x.emissive&&w.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(w.map.value=x.map,n(x.map,w.mapTransform)),x.alphaMap&&(w.alphaMap.value=x.alphaMap,n(x.alphaMap,w.alphaMapTransform)),x.bumpMap&&(w.bumpMap.value=x.bumpMap,n(x.bumpMap,w.bumpMapTransform),w.bumpScale.value=x.bumpScale,x.side===Vi&&(w.bumpScale.value*=-1)),x.normalMap&&(w.normalMap.value=x.normalMap,n(x.normalMap,w.normalMapTransform),w.normalScale.value.copy(x.normalScale),x.side===Vi&&w.normalScale.value.negate()),x.displacementMap&&(w.displacementMap.value=x.displacementMap,n(x.displacementMap,w.displacementMapTransform),w.displacementScale.value=x.displacementScale,w.displacementBias.value=x.displacementBias),x.emissiveMap&&(w.emissiveMap.value=x.emissiveMap,n(x.emissiveMap,w.emissiveMapTransform)),x.specularMap&&(w.specularMap.value=x.specularMap,n(x.specularMap,w.specularMapTransform)),x.alphaTest>0&&(w.alphaTest.value=x.alphaTest);const _=e.get(x).envMap;if(_&&(w.envMap.value=_,w.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,w.reflectivity.value=x.reflectivity,w.ior.value=x.ior,w.refractionRatio.value=x.refractionRatio),x.lightMap){w.lightMap.value=x.lightMap;const S=t._useLegacyLights===!0?Math.PI:1;w.lightMapIntensity.value=x.lightMapIntensity*S,n(x.lightMap,w.lightMapTransform)}x.aoMap&&(w.aoMap.value=x.aoMap,w.aoMapIntensity.value=x.aoMapIntensity,n(x.aoMap,w.aoMapTransform))}function a(w,x){w.diffuse.value.copy(x.color),w.opacity.value=x.opacity,x.map&&(w.map.value=x.map,n(x.map,w.mapTransform))}function o(w,x){w.dashSize.value=x.dashSize,w.totalSize.value=x.dashSize+x.gapSize,w.scale.value=x.scale}function c(w,x,_,S){w.diffuse.value.copy(x.color),w.opacity.value=x.opacity,w.size.value=x.size*_,w.scale.value=S*.5,x.map&&(w.map.value=x.map,n(x.map,w.uvTransform)),x.alphaMap&&(w.alphaMap.value=x.alphaMap,n(x.alphaMap,w.alphaMapTransform)),x.alphaTest>0&&(w.alphaTest.value=x.alphaTest)}function u(w,x){w.diffuse.value.copy(x.color),w.opacity.value=x.opacity,w.rotation.value=x.rotation,x.map&&(w.map.value=x.map,n(x.map,w.mapTransform)),x.alphaMap&&(w.alphaMap.value=x.alphaMap,n(x.alphaMap,w.alphaMapTransform)),x.alphaTest>0&&(w.alphaTest.value=x.alphaTest)}function f(w,x){w.specular.value.copy(x.specular),w.shininess.value=Math.max(x.shininess,1e-4)}function p(w,x){x.gradientMap&&(w.gradientMap.value=x.gradientMap)}function m(w,x){w.metalness.value=x.metalness,x.metalnessMap&&(w.metalnessMap.value=x.metalnessMap,n(x.metalnessMap,w.metalnessMapTransform)),w.roughness.value=x.roughness,x.roughnessMap&&(w.roughnessMap.value=x.roughnessMap,n(x.roughnessMap,w.roughnessMapTransform)),e.get(x).envMap&&(w.envMapIntensity.value=x.envMapIntensity)}function g(w,x,_){w.ior.value=x.ior,x.sheen>0&&(w.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),w.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(w.sheenColorMap.value=x.sheenColorMap,n(x.sheenColorMap,w.sheenColorMapTransform)),x.sheenRoughnessMap&&(w.sheenRoughnessMap.value=x.sheenRoughnessMap,n(x.sheenRoughnessMap,w.sheenRoughnessMapTransform))),x.clearcoat>0&&(w.clearcoat.value=x.clearcoat,w.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(w.clearcoatMap.value=x.clearcoatMap,n(x.clearcoatMap,w.clearcoatMapTransform)),x.clearcoatRoughnessMap&&(w.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap,n(x.clearcoatRoughnessMap,w.clearcoatRoughnessMapTransform)),x.clearcoatNormalMap&&(w.clearcoatNormalMap.value=x.clearcoatNormalMap,n(x.clearcoatNormalMap,w.clearcoatNormalMapTransform),w.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),x.side===Vi&&w.clearcoatNormalScale.value.negate())),x.iridescence>0&&(w.iridescence.value=x.iridescence,w.iridescenceIOR.value=x.iridescenceIOR,w.iridescenceThicknessMinimum.value=x.iridescenceThicknessRange[0],w.iridescenceThicknessMaximum.value=x.iridescenceThicknessRange[1],x.iridescenceMap&&(w.iridescenceMap.value=x.iridescenceMap,n(x.iridescenceMap,w.iridescenceMapTransform)),x.iridescenceThicknessMap&&(w.iridescenceThicknessMap.value=x.iridescenceThicknessMap,n(x.iridescenceThicknessMap,w.iridescenceThicknessMapTransform))),x.transmission>0&&(w.transmission.value=x.transmission,w.transmissionSamplerMap.value=_.texture,w.transmissionSamplerSize.value.set(_.width,_.height),x.transmissionMap&&(w.transmissionMap.value=x.transmissionMap,n(x.transmissionMap,w.transmissionMapTransform)),w.thickness.value=x.thickness,x.thicknessMap&&(w.thicknessMap.value=x.thicknessMap,n(x.thicknessMap,w.thicknessMapTransform)),w.attenuationDistance.value=x.attenuationDistance,w.attenuationColor.value.copy(x.attenuationColor)),x.anisotropy>0&&(w.anisotropyVector.value.set(x.anisotropy*Math.cos(x.anisotropyRotation),x.anisotropy*Math.sin(x.anisotropyRotation)),x.anisotropyMap&&(w.anisotropyMap.value=x.anisotropyMap,n(x.anisotropyMap,w.anisotropyMapTransform))),w.specularIntensity.value=x.specularIntensity,w.specularColor.value.copy(x.specularColor),x.specularColorMap&&(w.specularColorMap.value=x.specularColorMap,n(x.specularColorMap,w.specularColorMapTransform)),x.specularIntensityMap&&(w.specularIntensityMap.value=x.specularIntensityMap,n(x.specularIntensityMap,w.specularIntensityMapTransform))}function y(w,x){x.matcap&&(w.matcap.value=x.matcap)}function b(w,x){const _=e.get(x).light;w.referencePosition.value.setFromMatrixPosition(_.matrixWorld),w.nearDistance.value=_.shadow.camera.near,w.farDistance.value=_.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function VZ(t,e,n,i){let r={},s={},a=[];const o=n.isWebGL2?t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(_,S){const M=S.program;i.uniformBlockBinding(_,M)}function u(_,S){let M=r[_.id];M===void 0&&(y(_),M=f(_),r[_.id]=M,_.addEventListener("dispose",w));const E=S.program;i.updateUBOMapping(_,E);const C=e.render.frame;s[_.id]!==C&&(m(_),s[_.id]=C)}function f(_){const S=p();_.__bindingPointIndex=S;const M=t.createBuffer(),E=_.__size,C=_.usage;return t.bindBuffer(t.UNIFORM_BUFFER,M),t.bufferData(t.UNIFORM_BUFFER,E,C),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,S,M),M}function p(){for(let _=0;_<o;_++)if(a.indexOf(_)===-1)return a.push(_),_;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function m(_){const S=r[_.id],M=_.uniforms,E=_.__cache;t.bindBuffer(t.UNIFORM_BUFFER,S);for(let C=0,N=M.length;C<N;C++){const D=Array.isArray(M[C])?M[C]:[M[C]];for(let R=0,k=D.length;R<k;R++){const V=D[R];if(g(V,C,R,E)===!0){const G=V.__offset,ie=Array.isArray(V.value)?V.value:[V.value];let z=0;for(let $=0;$<ie.length;$++){const X=ie[$],ee=b(X);typeof X=="number"||typeof X=="boolean"?(V.__data[0]=X,t.bufferSubData(t.UNIFORM_BUFFER,G+z,V.__data)):X.isMatrix3?(V.__data[0]=X.elements[0],V.__data[1]=X.elements[1],V.__data[2]=X.elements[2],V.__data[3]=0,V.__data[4]=X.elements[3],V.__data[5]=X.elements[4],V.__data[6]=X.elements[5],V.__data[7]=0,V.__data[8]=X.elements[6],V.__data[9]=X.elements[7],V.__data[10]=X.elements[8],V.__data[11]=0):(X.toArray(V.__data,z),z+=ee.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,G,V.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}function g(_,S,M,E){const C=_.value,N=S+"_"+M;if(E[N]===void 0)return typeof C=="number"||typeof C=="boolean"?E[N]=C:E[N]=C.clone(),!0;{const D=E[N];if(typeof C=="number"||typeof C=="boolean"){if(D!==C)return E[N]=C,!0}else if(D.equals(C)===!1)return D.copy(C),!0}return!1}function y(_){const S=_.uniforms;let M=0;const E=16;for(let N=0,D=S.length;N<D;N++){const R=Array.isArray(S[N])?S[N]:[S[N]];for(let k=0,V=R.length;k<V;k++){const G=R[k],ie=Array.isArray(G.value)?G.value:[G.value];for(let z=0,$=ie.length;z<$;z++){const X=ie[z],ee=b(X),L=M%E;L!==0&&E-L<ee.boundary&&(M+=E-L),G.__data=new Float32Array(ee.storage/Float32Array.BYTES_PER_ELEMENT),G.__offset=M,M+=ee.storage}}}const C=M%E;return C>0&&(M+=E-C),_.__size=M,_.__cache={},this}function b(_){const S={boundary:0,storage:0};return typeof _=="number"||typeof _=="boolean"?(S.boundary=4,S.storage=4):_.isVector2?(S.boundary=8,S.storage=8):_.isVector3||_.isColor?(S.boundary=16,S.storage=12):_.isVector4?(S.boundary=16,S.storage=16):_.isMatrix3?(S.boundary=48,S.storage=48):_.isMatrix4?(S.boundary=64,S.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),S}function w(_){const S=_.target;S.removeEventListener("dispose",w);const M=a.indexOf(S.__bindingPointIndex);a.splice(M,1),t.deleteBuffer(r[S.id]),delete r[S.id],delete s[S.id]}function x(){for(const _ in r)t.deleteBuffer(r[_]);a=[],r={},s={}}return{bind:c,update:u,dispose:x}}class YA{constructor(e={}){const{canvas:n=nj(),context:i=null,depth:r=!0,stencil:s=!0,alpha:a=!1,antialias:o=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:u=!1,powerPreference:f="default",failIfMajorPerformanceCaveat:p=!1}=e;this.isWebGLRenderer=!0;let m;i!==null?m=i.getContextAttributes().alpha:m=a;const g=new Uint32Array(4),y=new Int32Array(4);let b=null,w=null;const x=[],_=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=qn,this._useLegacyLights=!1,this.toneMapping=Ws,this.toneMappingExposure=1;const S=this;let M=!1,E=0,C=0,N=null,D=-1,R=null;const k=new Yt,V=new Yt;let G=null;const ie=new Ue(0);let z=0,$=n.width,X=n.height,ee=1,L=null,j=null;const B=new Yt(0,0,$,X),Y=new Yt(0,0,$,X);let Z=!1;const K=new op;let se=!1,ge=!1,Ce=null;const xe=new pt,nt=new ye,it=new H,ze={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Xe(){return N===null?ee:1}let q=i;function _e(U,re){for(let le=0;le<U.length;le++){const ce=U[le],oe=n.getContext(ce,re);if(oe!==null)return oe}return null}try{const U={alpha:!0,depth:r,stencil:s,antialias:o,premultipliedAlpha:c,preserveDrawingBuffer:u,powerPreference:f,failIfMajorPerformanceCaveat:p};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${Ly}`),n.addEventListener("webglcontextlost",Re,!1),n.addEventListener("webglcontextrestored",Q,!1),n.addEventListener("webglcontextcreationerror",Le,!1),q===null){const re=["webgl2","webgl","experimental-webgl"];if(S.isWebGL1Renderer===!0&&re.shift(),q=_e(re,U),q===null)throw _e(re)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext<"u"&&q instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),q.getShaderPrecisionFormat===void 0&&(q.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(U){throw console.error("THREE.WebGLRenderer: "+U.message),U}let fe,Te,he,Qe,De,O,F,ne,Se,ve,we,$e,Pe,je,st,gt,be,Dt,St,ut,Ke,Ve,dt,jt;function Jt(){fe=new nK(q),Te=new QQ(q,fe,e),fe.init(Te),Ve=new mj(q,fe,Te),he=new jZ(q,fe,Te),Qe=new sK(q),De=new MZ,O=new OZ(q,fe,he,De,Te,Ve,Qe),F=new ZQ(S),ne=new tK(S),Se=new f$(q,Te),dt=new $Q(q,fe,Se,Te),ve=new iK(q,Se,Qe,dt),we=new cK(q,ve,Se,Qe),St=new lK(q,Te,O),gt=new KQ(De),$e=new AZ(S,F,ne,fe,Te,dt,gt),Pe=new BZ(S,De),je=new EZ,st=new kZ(fe,Te),Dt=new XQ(S,F,ne,he,we,m,c),be=new FZ(S,we,Te),jt=new VZ(q,Qe,Te,he),ut=new YQ(q,fe,Qe,Te),Ke=new rK(q,fe,Qe,Te),Qe.programs=$e.programs,S.capabilities=Te,S.extensions=fe,S.properties=De,S.renderLists=je,S.shadowMap=be,S.state=he,S.info=Qe}Jt();const vt=new zZ(S,q);this.xr=vt,this.getContext=function(){return q},this.getContextAttributes=function(){return q.getContextAttributes()},this.forceContextLoss=function(){const U=fe.get("WEBGL_lose_context");U&&U.loseContext()},this.forceContextRestore=function(){const U=fe.get("WEBGL_lose_context");U&&U.restoreContext()},this.getPixelRatio=function(){return ee},this.setPixelRatio=function(U){U!==void 0&&(ee=U,this.setSize($,X,!1))},this.getSize=function(U){return U.set($,X)},this.setSize=function(U,re,le=!0){if(vt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}$=U,X=re,n.width=Math.floor(U*ee),n.height=Math.floor(re*ee),le===!0&&(n.style.width=U+"px",n.style.height=re+"px"),this.setViewport(0,0,U,re)},this.getDrawingBufferSize=function(U){return U.set($*ee,X*ee).floor()},this.setDrawingBufferSize=function(U,re,le){$=U,X=re,ee=le,n.width=Math.floor(U*le),n.height=Math.floor(re*le),this.setViewport(0,0,U,re)},this.getCurrentViewport=function(U){return U.copy(k)},this.getViewport=function(U){return U.copy(B)},this.setViewport=function(U,re,le,ce){U.isVector4?B.set(U.x,U.y,U.z,U.w):B.set(U,re,le,ce),he.viewport(k.copy(B).multiplyScalar(ee).floor())},this.getScissor=function(U){return U.copy(Y)},this.setScissor=function(U,re,le,ce){U.isVector4?Y.set(U.x,U.y,U.z,U.w):Y.set(U,re,le,ce),he.scissor(V.copy(Y).multiplyScalar(ee).floor())},this.getScissorTest=function(){return Z},this.setScissorTest=function(U){he.setScissorTest(Z=U)},this.setOpaqueSort=function(U){L=U},this.setTransparentSort=function(U){j=U},this.getClearColor=function(U){return U.copy(Dt.getClearColor())},this.setClearColor=function(){Dt.setClearColor.apply(Dt,arguments)},this.getClearAlpha=function(){return Dt.getClearAlpha()},this.setClearAlpha=function(){Dt.setClearAlpha.apply(Dt,arguments)},this.clear=function(U=!0,re=!0,le=!0){let ce=0;if(U){let oe=!1;if(N!==null){const Be=N.texture.format;oe=Be===DA||Be===LA||Be===kA}if(oe){const Be=N.texture.type,et=Be===Gs||Be===wa||Be===jy||Be===No||Be===RA||Be===IA,lt=Dt.getClearColor(),ht=Dt.getClearAlpha(),xt=lt.r,mt=lt.g,yt=lt.b;et?(g[0]=xt,g[1]=mt,g[2]=yt,g[3]=ht,q.clearBufferuiv(q.COLOR,0,g)):(y[0]=xt,y[1]=mt,y[2]=yt,y[3]=ht,q.clearBufferiv(q.COLOR,0,y))}else ce|=q.COLOR_BUFFER_BIT}re&&(ce|=q.DEPTH_BUFFER_BIT),le&&(ce|=q.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),q.clear(ce)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",Re,!1),n.removeEventListener("webglcontextrestored",Q,!1),n.removeEventListener("webglcontextcreationerror",Le,!1),je.dispose(),st.dispose(),De.dispose(),F.dispose(),ne.dispose(),we.dispose(),dt.dispose(),jt.dispose(),$e.dispose(),vt.dispose(),vt.removeEventListener("sessionstart",Xt),vt.removeEventListener("sessionend",It),Ce&&(Ce.dispose(),Ce=null),nn.stop()};function Re(U){U.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function Q(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;const U=Qe.autoReset,re=be.enabled,le=be.autoUpdate,ce=be.needsUpdate,oe=be.type;Jt(),Qe.autoReset=U,be.enabled=re,be.autoUpdate=le,be.needsUpdate=ce,be.type=oe}function Le(U){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",U.statusMessage)}function Ie(U){const re=U.target;re.removeEventListener("dispose",Ie),ot(re)}function ot(U){Me(U),De.remove(U)}function Me(U){const re=De.get(U).programs;re!==void 0&&(re.forEach(function(le){$e.releaseProgram(le)}),U.isShaderMaterial&&$e.releaseShaderCache(U))}this.renderBufferDirect=function(U,re,le,ce,oe,Be){re===null&&(re=ze);const et=oe.isMesh&&oe.matrixWorld.determinant()<0,lt=dv(U,re,le,ce,oe);he.setMaterial(ce,et);let ht=le.index,xt=1;if(ce.wireframe===!0){if(ht=ve.getWireframeAttribute(le),ht===void 0)return;xt=2}const mt=le.drawRange,yt=le.attributes.position;let gn=mt.start*xt,li=(mt.start+mt.count)*xt;Be!==null&&(gn=Math.max(gn,Be.start*xt),li=Math.min(li,(Be.start+Be.count)*xt)),ht!==null?(gn=Math.max(gn,0),li=Math.min(li,ht.count)):yt!=null&&(gn=Math.max(gn,0),li=Math.min(li,yt.count));const rn=li-gn;if(rn<0||rn===1/0)return;dt.setup(oe,ce,lt,le,ht);let Zn,ft=ut;if(ht!==null&&(Zn=Se.get(ht),ft=Ke,ft.setIndex(Zn)),oe.isMesh)ce.wireframe===!0?(he.setLineWidth(ce.wireframeLinewidth*Xe()),ft.setMode(q.LINES)):ft.setMode(q.TRIANGLES);else if(oe.isLine){let Ge=ce.linewidth;Ge===void 0&&(Ge=1),he.setLineWidth(Ge*Xe()),oe.isLineSegments?ft.setMode(q.LINES):oe.isLineLoop?ft.setMode(q.LINE_LOOP):ft.setMode(q.LINE_STRIP)}else oe.isPoints?ft.setMode(q.POINTS):oe.isSprite&&ft.setMode(q.TRIANGLES);if(oe.isBatchedMesh)ft.renderMultiDraw(oe._multiDrawStarts,oe._multiDrawCounts,oe._multiDrawCount);else if(oe.isInstancedMesh)ft.renderInstances(gn,rn,oe.count);else if(le.isInstancedBufferGeometry){const Ge=le._maxInstanceCount!==void 0?le._maxInstanceCount:1/0,Cr=Math.min(le.instanceCount,Ge);ft.renderInstances(gn,rn,Cr)}else ft.render(gn,rn)};function Je(U,re,le){U.transparent===!0&&U.side===js&&U.forceSinglePass===!1?(U.side=Vi,U.needsUpdate=!0,gc(U,re,le),U.side=ka,U.needsUpdate=!0,gc(U,re,le),U.side=js):gc(U,re,le)}this.compile=function(U,re,le=null){le===null&&(le=U),w=st.get(le),w.init(),_.push(w),le.traverseVisible(function(oe){oe.isLight&&oe.layers.test(re.layers)&&(w.pushLight(oe),oe.castShadow&&w.pushShadow(oe))}),U!==le&&U.traverseVisible(function(oe){oe.isLight&&oe.layers.test(re.layers)&&(w.pushLight(oe),oe.castShadow&&w.pushShadow(oe))}),w.setupLights(S._useLegacyLights);const ce=new Set;return U.traverse(function(oe){const Be=oe.material;if(Be)if(Array.isArray(Be))for(let et=0;et<Be.length;et++){const lt=Be[et];Je(lt,le,oe),ce.add(lt)}else Je(Be,le,oe),ce.add(Be)}),_.pop(),w=null,ce},this.compileAsync=function(U,re,le=null){const ce=this.compile(U,re,le);return new Promise(oe=>{function Be(){if(ce.forEach(function(et){De.get(et).currentProgram.isReady()&&ce.delete(et)}),ce.size===0){oe(U);return}setTimeout(Be,10)}fe.get("KHR_parallel_shader_compile")!==null?Be():setTimeout(Be,10)})};let rt=null;function Ot(U){rt&&rt(U)}function Xt(){nn.stop()}function It(){nn.start()}const nn=new cj;nn.setAnimationLoop(Ot),typeof self<"u"&&nn.setContext(self),this.setAnimationLoop=function(U){rt=U,vt.setAnimationLoop(U),U===null?nn.stop():nn.start()},vt.addEventListener("sessionstart",Xt),vt.addEventListener("sessionend",It),this.render=function(U,re){if(re!==void 0&&re.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(M===!0)return;U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),re.parent===null&&re.matrixWorldAutoUpdate===!0&&re.updateMatrixWorld(),vt.enabled===!0&&vt.isPresenting===!0&&(vt.cameraAutoUpdate===!0&&vt.updateCamera(re),re=vt.getCamera()),U.isScene===!0&&U.onBeforeRender(S,U,re,N),w=st.get(U,_.length),w.init(),_.push(w),xe.multiplyMatrices(re.projectionMatrix,re.matrixWorldInverse),K.setFromProjectionMatrix(xe),ge=this.localClippingEnabled,se=gt.init(this.clippingPlanes,ge),b=je.get(U,x.length),b.init(),x.push(b),hn(U,re,0,S.sortObjects),b.finish(),S.sortObjects===!0&&b.sort(L,j),this.info.render.frame++,se===!0&>.beginShadows();const le=w.state.shadowsArray;if(be.render(le,U,re),se===!0&>.endShadows(),this.info.autoReset===!0&&this.info.reset(),Dt.render(b,U),w.setupLights(S._useLegacyLights),re.isArrayCamera){const ce=re.cameras;for(let oe=0,Be=ce.length;oe<Be;oe++){const et=ce[oe];Xi(b,U,et,et.viewport)}}else Xi(b,U,re);N!==null&&(O.updateMultisampleRenderTarget(N),O.updateRenderTargetMipmap(N)),U.isScene===!0&&U.onAfterRender(S,U,re),dt.resetDefaultState(),D=-1,R=null,_.pop(),_.length>0?w=_[_.length-1]:w=null,x.pop(),x.length>0?b=x[x.length-1]:b=null};function hn(U,re,le,ce){if(U.visible===!1)return;if(U.layers.test(re.layers)){if(U.isGroup)le=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(re);else if(U.isLight)w.pushLight(U),U.castShadow&&w.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||K.intersectsSprite(U)){ce&&it.setFromMatrixPosition(U.matrixWorld).applyMatrix4(xe);const et=we.update(U),lt=U.material;lt.visible&&b.push(U,et,lt,le,it.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(!U.frustumCulled||K.intersectsObject(U))){const et=we.update(U),lt=U.material;if(ce&&(U.boundingSphere!==void 0?(U.boundingSphere===null&&U.computeBoundingSphere(),it.copy(U.boundingSphere.center)):(et.boundingSphere===null&&et.computeBoundingSphere(),it.copy(et.boundingSphere.center)),it.applyMatrix4(U.matrixWorld).applyMatrix4(xe)),Array.isArray(lt)){const ht=et.groups;for(let xt=0,mt=ht.length;xt<mt;xt++){const yt=ht[xt],gn=lt[yt.materialIndex];gn&&gn.visible&&b.push(U,et,gn,le,it.z,yt)}}else lt.visible&&b.push(U,et,lt,le,it.z,null)}}const Be=U.children;for(let et=0,lt=Be.length;et<lt;et++)hn(Be[et],re,le,ce)}function Xi(U,re,le,ce){const oe=U.opaque,Be=U.transmissive,et=U.transparent;w.setupLightsView(le),se===!0&>.setGlobalState(S.clippingPlanes,le),Be.length>0&&Sd(oe,Be,re,le),ce&&he.viewport(k.copy(ce)),oe.length>0&&mc(oe,re,le),Be.length>0&&mc(Be,re,le),et.length>0&&mc(et,re,le),he.buffers.depth.setTest(!0),he.buffers.depth.setMask(!0),he.buffers.color.setMask(!0),he.setPolygonOffset(!1)}function Sd(U,re,le,ce){if((le.isScene===!0?le.overrideMaterial:null)!==null)return;const Be=Te.isWebGL2;Ce===null&&(Ce=new ys(1,1,{generateMipmaps:!0,type:fe.has("EXT_color_buffer_half_float")?td:Gs,minFilter:Bo,samples:Be?4:0})),S.getDrawingBufferSize(nt),Be?Ce.setSize(nt.x,nt.y):Ce.setSize(qx(nt.x),qx(nt.y));const et=S.getRenderTarget();S.setRenderTarget(Ce),S.getClearColor(ie),z=S.getClearAlpha(),z<1&&S.setClearColor(16777215,.5),S.clear();const lt=S.toneMapping;S.toneMapping=Ws,mc(U,le,ce),O.updateMultisampleRenderTarget(Ce),O.updateRenderTargetMipmap(Ce);let ht=!1;for(let xt=0,mt=re.length;xt<mt;xt++){const yt=re[xt],gn=yt.object,li=yt.geometry,rn=yt.material,Zn=yt.group;if(rn.side===js&&gn.layers.test(ce.layers)){const ft=rn.side;rn.side=Vi,rn.needsUpdate=!0,Ua(gn,le,ce,li,rn,Zn),rn.side=ft,rn.needsUpdate=!0,ht=!0}}ht===!0&&(O.updateMultisampleRenderTarget(Ce),O.updateRenderTargetMipmap(Ce)),S.setRenderTarget(et),S.setClearColor(ie,z),S.toneMapping=lt}function mc(U,re,le){const ce=re.isScene===!0?re.overrideMaterial:null;for(let oe=0,Be=U.length;oe<Be;oe++){const et=U[oe],lt=et.object,ht=et.geometry,xt=ce===null?et.material:ce,mt=et.group;lt.layers.test(le.layers)&&Ua(lt,re,le,ht,xt,mt)}}function Ua(U,re,le,ce,oe,Be){U.onBeforeRender(S,re,le,ce,oe,Be),U.modelViewMatrix.multiplyMatrices(le.matrixWorldInverse,U.matrixWorld),U.normalMatrix.getNormalMatrix(U.modelViewMatrix),oe.onBeforeRender(S,re,le,ce,U,Be),oe.transparent===!0&&oe.side===js&&oe.forceSinglePass===!1?(oe.side=Vi,oe.needsUpdate=!0,S.renderBufferDirect(le,re,ce,oe,U,Be),oe.side=ka,oe.needsUpdate=!0,S.renderBufferDirect(le,re,ce,oe,U,Be),oe.side=js):S.renderBufferDirect(le,re,ce,oe,U,Be),U.onAfterRender(S,re,le,ce,oe,Be)}function gc(U,re,le){re.isScene!==!0&&(re=ze);const ce=De.get(U),oe=w.state.lights,Be=w.state.shadowsArray,et=oe.state.version,lt=$e.getParameters(U,oe.state,Be,re,le),ht=$e.getProgramCacheKey(lt);let xt=ce.programs;ce.environment=U.isMeshStandardMaterial?re.environment:null,ce.fog=re.fog,ce.envMap=(U.isMeshStandardMaterial?ne:F).get(U.envMap||ce.environment),xt===void 0&&(U.addEventListener("dispose",Ie),xt=new Map,ce.programs=xt);let mt=xt.get(ht);if(mt!==void 0){if(ce.currentProgram===mt&&ce.lightsStateVersion===et)return gp(U,lt),mt}else lt.uniforms=$e.getUniforms(U),U.onBuild(le,lt,S),U.onBeforeCompile(lt,S),mt=$e.acquireProgram(lt,ht),xt.set(ht,mt),ce.uniforms=lt.uniforms;const yt=ce.uniforms;return(!U.isShaderMaterial&&!U.isRawShaderMaterial||U.clipping===!0)&&(yt.clippingPlanes=gt.uniform),gp(U,lt),ce.needsLights=fv(U),ce.lightsStateVersion=et,ce.needsLights&&(yt.ambientLightColor.value=oe.state.ambient,yt.lightProbe.value=oe.state.probe,yt.directionalLights.value=oe.state.directional,yt.directionalLightShadows.value=oe.state.directionalShadow,yt.spotLights.value=oe.state.spot,yt.spotLightShadows.value=oe.state.spotShadow,yt.rectAreaLights.value=oe.state.rectArea,yt.ltc_1.value=oe.state.rectAreaLTC1,yt.ltc_2.value=oe.state.rectAreaLTC2,yt.pointLights.value=oe.state.point,yt.pointLightShadows.value=oe.state.pointShadow,yt.hemisphereLights.value=oe.state.hemi,yt.directionalShadowMap.value=oe.state.directionalShadowMap,yt.directionalShadowMatrix.value=oe.state.directionalShadowMatrix,yt.spotShadowMap.value=oe.state.spotShadowMap,yt.spotLightMatrix.value=oe.state.spotLightMatrix,yt.spotLightMap.value=oe.state.spotLightMap,yt.pointShadowMap.value=oe.state.pointShadowMap,yt.pointShadowMatrix.value=oe.state.pointShadowMatrix),ce.currentProgram=mt,ce.uniformsList=null,mt}function mp(U){if(U.uniformsList===null){const re=U.currentProgram.getUniforms();U.uniformsList=nx.seqWithValue(re.seq,U.uniforms)}return U.uniformsList}function gp(U,re){const le=De.get(U);le.outputColorSpace=re.outputColorSpace,le.batching=re.batching,le.instancing=re.instancing,le.instancingColor=re.instancingColor,le.skinning=re.skinning,le.morphTargets=re.morphTargets,le.morphNormals=re.morphNormals,le.morphColors=re.morphColors,le.morphTargetsCount=re.morphTargetsCount,le.numClippingPlanes=re.numClippingPlanes,le.numIntersection=re.numClipIntersection,le.vertexAlphas=re.vertexAlphas,le.vertexTangents=re.vertexTangents,le.toneMapping=re.toneMapping}function dv(U,re,le,ce,oe){re.isScene!==!0&&(re=ze),O.resetTextureUnits();const Be=re.fog,et=ce.isMeshStandardMaterial?re.environment:null,lt=N===null?S.outputColorSpace:N.isXRRenderTarget===!0?N.texture.colorSpace:Ys,ht=(ce.isMeshStandardMaterial?ne:F).get(ce.envMap||et),xt=ce.vertexColors===!0&&!!le.attributes.color&&le.attributes.color.itemSize===4,mt=!!le.attributes.tangent&&(!!ce.normalMap||ce.anisotropy>0),yt=!!le.morphAttributes.position,gn=!!le.morphAttributes.normal,li=!!le.morphAttributes.color;let rn=Ws;ce.toneMapped&&(N===null||N.isXRRenderTarget===!0)&&(rn=S.toneMapping);const Zn=le.morphAttributes.position||le.morphAttributes.normal||le.morphAttributes.color,ft=Zn!==void 0?Zn.length:0,Ge=De.get(ce),Cr=w.state.lights;if(se===!0&&(ge===!0||U!==R)){const ci=U===R&&ce.id===D;gt.setState(ce,U,ci)}let Nt=!1;ce.version===Ge.__version?(Ge.needsLights&&Ge.lightsStateVersion!==Cr.state.version||Ge.outputColorSpace!==lt||oe.isBatchedMesh&&Ge.batching===!1||!oe.isBatchedMesh&&Ge.batching===!0||oe.isInstancedMesh&&Ge.instancing===!1||!oe.isInstancedMesh&&Ge.instancing===!0||oe.isSkinnedMesh&&Ge.skinning===!1||!oe.isSkinnedMesh&&Ge.skinning===!0||oe.isInstancedMesh&&Ge.instancingColor===!0&&oe.instanceColor===null||oe.isInstancedMesh&&Ge.instancingColor===!1&&oe.instanceColor!==null||Ge.envMap!==ht||ce.fog===!0&&Ge.fog!==Be||Ge.numClippingPlanes!==void 0&&(Ge.numClippingPlanes!==gt.numPlanes||Ge.numIntersection!==gt.numIntersection)||Ge.vertexAlphas!==xt||Ge.vertexTangents!==mt||Ge.morphTargets!==yt||Ge.morphNormals!==gn||Ge.morphColors!==li||Ge.toneMapping!==rn||Te.isWebGL2===!0&&Ge.morphTargetsCount!==ft)&&(Nt=!0):(Nt=!0,Ge.__version=ce.version);let Sn=Ge.currentProgram;Nt===!0&&(Sn=gc(ce,re,oe));let _s=!1,Pr=!1,Jn=!1;const Nn=Sn.getUniforms(),Ss=Ge.uniforms;if(he.useProgram(Sn.program)&&(_s=!0,Pr=!0,Jn=!0),ce.id!==D&&(D=ce.id,Pr=!0),_s||R!==U){Nn.setValue(q,"projectionMatrix",U.projectionMatrix),Nn.setValue(q,"viewMatrix",U.matrixWorldInverse);const ci=Nn.map.cameraPosition;ci!==void 0&&ci.setValue(q,it.setFromMatrixPosition(U.matrixWorld)),Te.logarithmicDepthBuffer&&Nn.setValue(q,"logDepthBufFC",2/(Math.log(U.far+1)/Math.LN2)),(ce.isMeshPhongMaterial||ce.isMeshToonMaterial||ce.isMeshLambertMaterial||ce.isMeshBasicMaterial||ce.isMeshStandardMaterial||ce.isShaderMaterial)&&Nn.setValue(q,"isOrthographic",U.isOrthographicCamera===!0),R!==U&&(R=U,Pr=!0,Jn=!0)}if(oe.isSkinnedMesh){Nn.setOptional(q,oe,"bindMatrix"),Nn.setOptional(q,oe,"bindMatrixInverse");const ci=oe.skeleton;ci&&(Te.floatVertexTextures?(ci.boneTexture===null&&ci.computeBoneTexture(),Nn.setValue(q,"boneTexture",ci.boneTexture,O)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}oe.isBatchedMesh&&(Nn.setOptional(q,oe,"batchingTexture"),Nn.setValue(q,"batchingTexture",oe._matricesTexture,O));const xc=le.morphAttributes;if((xc.position!==void 0||xc.normal!==void 0||xc.color!==void 0&&Te.isWebGL2===!0)&&St.update(oe,le,Sn),(Pr||Ge.receiveShadow!==oe.receiveShadow)&&(Ge.receiveShadow=oe.receiveShadow,Nn.setValue(q,"receiveShadow",oe.receiveShadow)),ce.isMeshGouraudMaterial&&ce.envMap!==null&&(Ss.envMap.value=ht,Ss.flipEnvMap.value=ht.isCubeTexture&&ht.isRenderTargetTexture===!1?-1:1),Pr&&(Nn.setValue(q,"toneMappingExposure",S.toneMappingExposure),Ge.needsLights&&hv(Ss,Jn),Be&&ce.fog===!0&&Pe.refreshFogUniforms(Ss,Be),Pe.refreshMaterialUniforms(Ss,ce,ee,X,Ce),nx.upload(q,mp(Ge),Ss,O)),ce.isShaderMaterial&&ce.uniformsNeedUpdate===!0&&(nx.upload(q,mp(Ge),Ss,O),ce.uniformsNeedUpdate=!1),ce.isSpriteMaterial&&Nn.setValue(q,"center",oe.center),Nn.setValue(q,"modelViewMatrix",oe.modelViewMatrix),Nn.setValue(q,"normalMatrix",oe.normalMatrix),Nn.setValue(q,"modelMatrix",oe.matrixWorld),ce.isShaderMaterial||ce.isRawShaderMaterial){const ci=ce.uniformsGroups;for(let yc=0,lr=ci.length;yc<lr;yc++)if(Te.isWebGL2){const xp=ci[yc];jt.update(xp,Sn),jt.bind(xp,Sn)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return Sn}function hv(U,re){U.ambientLightColor.needsUpdate=re,U.lightProbe.needsUpdate=re,U.directionalLights.needsUpdate=re,U.directionalLightShadows.needsUpdate=re,U.pointLights.needsUpdate=re,U.pointLightShadows.needsUpdate=re,U.spotLights.needsUpdate=re,U.spotLightShadows.needsUpdate=re,U.rectAreaLights.needsUpdate=re,U.hemisphereLights.needsUpdate=re}function fv(U){return U.isMeshLambertMaterial||U.isMeshToonMaterial||U.isMeshPhongMaterial||U.isMeshStandardMaterial||U.isShadowMaterial||U.isShaderMaterial&&U.lights===!0}this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return C},this.getRenderTarget=function(){return N},this.setRenderTargetTextures=function(U,re,le){De.get(U.texture).__webglTexture=re,De.get(U.depthTexture).__webglTexture=le;const ce=De.get(U);ce.__hasExternalTextures=!0,ce.__hasExternalTextures&&(ce.__autoAllocateDepthBuffer=le===void 0,ce.__autoAllocateDepthBuffer||fe.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ce.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(U,re){const le=De.get(U);le.__webglFramebuffer=re,le.__useDefaultFramebuffer=re===void 0},this.setRenderTarget=function(U,re=0,le=0){N=U,E=re,C=le;let ce=!0,oe=null,Be=!1,et=!1;if(U){const ht=De.get(U);ht.__useDefaultFramebuffer!==void 0?(he.bindFramebuffer(q.FRAMEBUFFER,null),ce=!1):ht.__webglFramebuffer===void 0?O.setupRenderTarget(U):ht.__hasExternalTextures&&O.rebindTextures(U,De.get(U.texture).__webglTexture,De.get(U.depthTexture).__webglTexture);const xt=U.texture;(xt.isData3DTexture||xt.isDataArrayTexture||xt.isCompressedArrayTexture)&&(et=!0);const mt=De.get(U).__webglFramebuffer;U.isWebGLCubeRenderTarget?(Array.isArray(mt[re])?oe=mt[re][le]:oe=mt[re],Be=!0):Te.isWebGL2&&U.samples>0&&O.useMultisampledRTT(U)===!1?oe=De.get(U).__webglMultisampledFramebuffer:Array.isArray(mt)?oe=mt[le]:oe=mt,k.copy(U.viewport),V.copy(U.scissor),G=U.scissorTest}else k.copy(B).multiplyScalar(ee).floor(),V.copy(Y).multiplyScalar(ee).floor(),G=Z;if(he.bindFramebuffer(q.FRAMEBUFFER,oe)&&Te.drawBuffers&&ce&&he.drawBuffers(U,oe),he.viewport(k),he.scissor(V),he.setScissorTest(G),Be){const ht=De.get(U.texture);q.framebufferTexture2D(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,q.TEXTURE_CUBE_MAP_POSITIVE_X+re,ht.__webglTexture,le)}else if(et){const ht=De.get(U.texture),xt=re||0;q.framebufferTextureLayer(q.FRAMEBUFFER,q.COLOR_ATTACHMENT0,ht.__webglTexture,le||0,xt)}D=-1},this.readRenderTargetPixels=function(U,re,le,ce,oe,Be,et){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let lt=De.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&et!==void 0&&(lt=lt[et]),lt){he.bindFramebuffer(q.FRAMEBUFFER,lt);try{const ht=U.texture,xt=ht.format,mt=ht.type;if(xt!==zi&&Ve.convert(xt)!==q.getParameter(q.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const yt=mt===td&&(fe.has("EXT_color_buffer_half_float")||Te.isWebGL2&&fe.has("EXT_color_buffer_float"));if(mt!==Gs&&Ve.convert(mt)!==q.getParameter(q.IMPLEMENTATION_COLOR_READ_TYPE)&&!(mt===ds&&(Te.isWebGL2||fe.has("OES_texture_float")||fe.has("WEBGL_color_buffer_float")))&&!yt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=U.width-ce&&le>=0&&le<=U.height-oe&&q.readPixels(re,le,ce,oe,Ve.convert(xt),Ve.convert(mt),Be)}finally{const ht=N!==null?De.get(N).__webglFramebuffer:null;he.bindFramebuffer(q.FRAMEBUFFER,ht)}}},this.copyFramebufferToTexture=function(U,re,le=0){const ce=Math.pow(2,-le),oe=Math.floor(re.image.width*ce),Be=Math.floor(re.image.height*ce);O.setTexture2D(re,0),q.copyTexSubImage2D(q.TEXTURE_2D,le,0,0,U.x,U.y,oe,Be),he.unbindTexture()},this.copyTextureToTexture=function(U,re,le,ce=0){const oe=re.image.width,Be=re.image.height,et=Ve.convert(le.format),lt=Ve.convert(le.type);O.setTexture2D(le,0),q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,le.flipY),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),q.pixelStorei(q.UNPACK_ALIGNMENT,le.unpackAlignment),re.isDataTexture?q.texSubImage2D(q.TEXTURE_2D,ce,U.x,U.y,oe,Be,et,lt,re.image.data):re.isCompressedTexture?q.compressedTexSubImage2D(q.TEXTURE_2D,ce,U.x,U.y,re.mipmaps[0].width,re.mipmaps[0].height,et,re.mipmaps[0].data):q.texSubImage2D(q.TEXTURE_2D,ce,U.x,U.y,et,lt,re.image),ce===0&&le.generateMipmaps&&q.generateMipmap(q.TEXTURE_2D),he.unbindTexture()},this.copyTextureToTexture3D=function(U,re,le,ce,oe=0){if(S.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Be=U.max.x-U.min.x+1,et=U.max.y-U.min.y+1,lt=U.max.z-U.min.z+1,ht=Ve.convert(ce.format),xt=Ve.convert(ce.type);let mt;if(ce.isData3DTexture)O.setTexture3D(ce,0),mt=q.TEXTURE_3D;else if(ce.isDataArrayTexture||ce.isCompressedArrayTexture)O.setTexture2DArray(ce,0),mt=q.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}q.pixelStorei(q.UNPACK_FLIP_Y_WEBGL,ce.flipY),q.pixelStorei(q.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ce.premultiplyAlpha),q.pixelStorei(q.UNPACK_ALIGNMENT,ce.unpackAlignment);const yt=q.getParameter(q.UNPACK_ROW_LENGTH),gn=q.getParameter(q.UNPACK_IMAGE_HEIGHT),li=q.getParameter(q.UNPACK_SKIP_PIXELS),rn=q.getParameter(q.UNPACK_SKIP_ROWS),Zn=q.getParameter(q.UNPACK_SKIP_IMAGES),ft=le.isCompressedTexture?le.mipmaps[oe]:le.image;q.pixelStorei(q.UNPACK_ROW_LENGTH,ft.width),q.pixelStorei(q.UNPACK_IMAGE_HEIGHT,ft.height),q.pixelStorei(q.UNPACK_SKIP_PIXELS,U.min.x),q.pixelStorei(q.UNPACK_SKIP_ROWS,U.min.y),q.pixelStorei(q.UNPACK_SKIP_IMAGES,U.min.z),le.isDataTexture||le.isData3DTexture?q.texSubImage3D(mt,oe,re.x,re.y,re.z,Be,et,lt,ht,xt,ft.data):le.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),q.compressedTexSubImage3D(mt,oe,re.x,re.y,re.z,Be,et,lt,ht,ft.data)):q.texSubImage3D(mt,oe,re.x,re.y,re.z,Be,et,lt,ht,xt,ft),q.pixelStorei(q.UNPACK_ROW_LENGTH,yt),q.pixelStorei(q.UNPACK_IMAGE_HEIGHT,gn),q.pixelStorei(q.UNPACK_SKIP_PIXELS,li),q.pixelStorei(q.UNPACK_SKIP_ROWS,rn),q.pixelStorei(q.UNPACK_SKIP_IMAGES,Zn),oe===0&&ce.generateMipmaps&&q.generateMipmap(mt),he.unbindTexture()},this.initTexture=function(U){U.isCubeTexture?O.setTextureCube(U,0):U.isData3DTexture?O.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?O.setTexture2DArray(U,0):O.setTexture2D(U,0),he.unbindTexture()},this.resetState=function(){E=0,C=0,N=null,he.reset(),dt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return hs}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const n=this.getContext();n.drawingBufferColorSpace=e===Uy?"display-p3":"srgb",n.unpackColorSpace=$t.workingColorSpace===ip?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===qn?Io:OA}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Io?qn:Ys}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class xj extends YA{}xj.prototype.isWebGL1Renderer=!0;class Vy{constructor(e,n=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ue(e),this.density=n}clone(){return new Vy(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Hy{constructor(e,n=1,i=1e3){this.isFog=!0,this.name="",this.color=new Ue(e),this.near=n,this.far=i}clone(){return new Hy(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class QA extends Gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n}}class Wy{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=Pf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=_r()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return console.warn("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,i){e*=this.stride,i*=n.stride;for(let r=0,s=this.stride;r<s;r++)this.array[e+r]=n.array[i+r];return this}set(e,n=0){return this.array.set(e,n),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=_r()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const n=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(n,this.stride);return i.setUsage(this.usage),i}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=_r()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Di=new H;class sc{constructor(e,n,i,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=n,this.offset=i,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let n=0,i=this.data.count;n<i;n++)Di.fromBufferAttribute(this,n),Di.applyMatrix4(e),this.setXYZ(n,Di.x,Di.y,Di.z);return this}applyNormalMatrix(e){for(let n=0,i=this.count;n<i;n++)Di.fromBufferAttribute(this,n),Di.applyNormalMatrix(e),this.setXYZ(n,Di.x,Di.y,Di.z);return this}transformDirection(e){for(let n=0,i=this.count;n<i;n++)Di.fromBufferAttribute(this,n),Di.transformDirection(e),this.setXYZ(n,Di.x,Di.y,Di.z);return this}setX(e,n){return this.normalized&&(n=Et(n,this.array)),this.data.array[e*this.data.stride+this.offset]=n,this}setY(e,n){return this.normalized&&(n=Et(n,this.array)),this.data.array[e*this.data.stride+this.offset+1]=n,this}setZ(e,n){return this.normalized&&(n=Et(n,this.array)),this.data.array[e*this.data.stride+this.offset+2]=n,this}setW(e,n){return this.normalized&&(n=Et(n,this.array)),this.data.array[e*this.data.stride+this.offset+3]=n,this}getX(e){let n=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(n=tr(n,this.array)),n}getY(e){let n=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(n=tr(n,this.array)),n}getZ(e){let n=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(n=tr(n,this.array)),n}getW(e){let n=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(n=tr(n,this.array)),n}setXY(e,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this}setXYZ(e,n,i,r){return e=e*this.data.stride+this.offset,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array),r=Et(r,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this.data.array[e+2]=r,this}setXYZW(e,n,i,r,s){return e=e*this.data.stride+this.offset,this.normalized&&(n=Et(n,this.array),i=Et(i,this.array),r=Et(r,this.array),s=Et(s,this.array)),this.data.array[e+0]=n,this.data.array[e+1]=i,this.data.array[e+2]=r,this.data.array[e+3]=s,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)n.push(this.data.array[r+s])}return new qt(new this.array.constructor(n),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new sc(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const n=[];for(let i=0;i<this.count;i++){const r=i*this.data.stride+this.offset;for(let s=0;s<this.itemSize;s++)n.push(this.data.array[r+s])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:n,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class KA extends Ii{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Ue(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let Xc;const rh=new H,$c=new H,Yc=new H,Qc=new ye,sh=new ye,yj=new pt,sg=new H,ah=new H,ag=new H,JP=new ye,jw=new ye,eN=new ye;class vj extends Gt{constructor(e=new KA){if(super(),this.isSprite=!0,this.type="Sprite",Xc===void 0){Xc=new At;const n=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new Wy(n,5);Xc.setIndex([0,1,2,0,2,3]),Xc.setAttribute("position",new sc(i,3,0,!1)),Xc.setAttribute("uv",new sc(i,2,3,!1))}this.geometry=Xc,this.material=e,this.center=new ye(.5,.5)}raycast(e,n){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),$c.setFromMatrixScale(this.matrixWorld),yj.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Yc.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&$c.multiplyScalar(-Yc.z);const i=this.material.rotation;let r,s;i!==0&&(s=Math.cos(i),r=Math.sin(i));const a=this.center;og(sg.set(-.5,-.5,0),Yc,a,$c,r,s),og(ah.set(.5,-.5,0),Yc,a,$c,r,s),og(ag.set(.5,.5,0),Yc,a,$c,r,s),JP.set(0,0),jw.set(1,0),eN.set(1,1);let o=e.ray.intersectTriangle(sg,ah,ag,!1,rh);if(o===null&&(og(ah.set(-.5,.5,0),Yc,a,$c,r,s),jw.set(0,1),o=e.ray.intersectTriangle(sg,ag,ah,!1,rh),o===null))return;const c=e.ray.origin.distanceTo(rh);c<e.near||c>e.far||n.push({distance:c,point:rh.clone(),uv:er.getInterpolation(rh,sg,ah,ag,JP,jw,eN,new ye),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function og(t,e,n,i,r,s){Qc.subVectors(t,n).addScalar(.5).multiply(i),r!==void 0?(sh.x=s*Qc.x-r*Qc.y,sh.y=r*Qc.x+s*Qc.y):sh.copy(Qc),t.copy(e),t.x+=sh.x,t.y+=sh.y,t.applyMatrix4(yj)}const lg=new H,tN=new H;class wj extends Gt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const n=e.levels;for(let i=0,r=n.length;i<r;i++){const s=n[i];this.addLevel(s.object.clone(),s.distance,s.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,n=0,i=0){n=Math.abs(n);const r=this.levels;let s;for(s=0;s<r.length&&!(n<r[s].distance);s++);return r.splice(s,0,{distance:n,hysteresis:i,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const n=this.levels;if(n.length>0){let i,r;for(i=1,r=n.length;i<r;i++){let s=n[i].distance;if(n[i].object.visible&&(s-=s*n[i].hysteresis),e<s)break}return n[i-1].object}return null}raycast(e,n){if(this.levels.length>0){lg.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(lg);this.getObjectForDistance(r).raycast(e,n)}}update(e){const n=this.levels;if(n.length>1){lg.setFromMatrixPosition(e.matrixWorld),tN.setFromMatrixPosition(this.matrixWorld);const i=lg.distanceTo(tN)/e.zoom;n[0].object.visible=!0;let r,s;for(r=1,s=n.length;r<s;r++){let a=n[r].distance;if(n[r].object.visible&&(a-=a*n[r].hysteresis),i>=a)n[r-1].object.visible=!1,n[r].object.visible=!0;else break}for(this._currentLevel=r-1;r<s;r++)n[r].object.visible=!1}}toJSON(e){const n=super.toJSON(e);this.autoUpdate===!1&&(n.object.autoUpdate=!1),n.object.levels=[];const i=this.levels;for(let r=0,s=i.length;r<s;r++){const a=i[r];n.object.levels.push({object:a.object.uuid,distance:a.distance,hysteresis:a.hysteresis})}return n}}const nN=new H,iN=new Yt,rN=new Yt,HZ=new H,sN=new pt,cg=new H,Ow=new Ni,aN=new pt,Uw=new vd;class bj extends $n{constructor(e,n){super(e,n),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=H1,this.bindMatrix=new pt,this.bindMatrixInverse=new pt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Hi),this.boundingBox.makeEmpty();const n=e.getAttribute("position");for(let i=0;i<n.count;i++)this.getVertexPosition(i,cg),this.boundingBox.expandByPoint(cg)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Ni),this.boundingSphere.makeEmpty();const n=e.getAttribute("position");for(let i=0;i<n.count;i++)this.getVertexPosition(i,cg),this.boundingSphere.expandByPoint(cg)}copy(e,n){return super.copy(e,n),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,n){const i=this.material,r=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Ow.copy(this.boundingSphere),Ow.applyMatrix4(r),e.ray.intersectsSphere(Ow)!==!1&&(aN.copy(r).invert(),Uw.copy(e.ray).applyMatrix4(aN),!(this.boundingBox!==null&&Uw.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,n,Uw)))}getVertexPosition(e,n){return super.getVertexPosition(e,n),this.applyBoneTransform(e,n),n}bind(e,n){this.skeleton=e,n===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),n=this.matrixWorld),this.bindMatrix.copy(n),this.bindMatrixInverse.copy(n).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Yt,n=this.geometry.attributes.skinWeight;for(let i=0,r=n.count;i<r;i++){e.fromBufferAttribute(n,i);const s=1/e.manhattanLength();s!==1/0?e.multiplyScalar(s):e.set(1,0,0,0),n.setXYZW(i,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===H1?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===kF?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,n){const i=this.skeleton,r=this.geometry;iN.fromBufferAttribute(r.attributes.skinIndex,e),rN.fromBufferAttribute(r.attributes.skinWeight,e),nN.copy(n).applyMatrix4(this.bindMatrix),n.set(0,0,0);for(let s=0;s<4;s++){const a=rN.getComponent(s);if(a!==0){const o=iN.getComponent(s);sN.multiplyMatrices(i.bones[o].matrixWorld,i.boneInverses[o]),n.addScaledVector(HZ.copy(nN).applyMatrix4(sN),a)}}return n.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,n){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,n)}}class ZA extends Gt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Xl extends Un{constructor(e=null,n=1,i=1,r,s,a,o,c,u=Ln,f=Ln,p,m){super(null,a,o,c,u,f,r,s,p,m),this.isDataTexture=!0,this.image={data:e,width:n,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const oN=new pt,WZ=new pt;class Gy{constructor(e=[],n=[]){this.uuid=_r(),this.bones=e.slice(0),this.boneInverses=n,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,n=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),n.length===0)this.calculateInverses();else if(e.length!==n.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,r=this.bones.length;i<r;i++)this.boneInverses.push(new pt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,n=this.bones.length;e<n;e++){const i=new pt;this.bones[e]&&i.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let e=0,n=this.bones.length;e<n;e++){const i=this.bones[e];i&&i.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,n=this.bones.length;e<n;e++){const i=this.bones[e];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const e=this.bones,n=this.boneInverses,i=this.boneMatrices,r=this.boneTexture;for(let s=0,a=e.length;s<a;s++){const o=e[s]?e[s].matrixWorld:WZ;oN.multiplyMatrices(o,n[s]),oN.toArray(i,s*16)}r!==null&&(r.needsUpdate=!0)}clone(){return new Gy(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const n=new Float32Array(e*e*4);n.set(this.boneMatrices);const i=new Xl(n,e,e,zi,ds);return i.needsUpdate=!0,this.boneMatrices=n,this.boneTexture=i,this}getBoneByName(e){for(let n=0,i=this.bones.length;n<i;n++){const r=this.bones[n];if(r.name===e)return r}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,n){this.uuid=e.uuid;for(let i=0,r=e.bones.length;i<r;i++){const s=e.bones[i];let a=n[s];a===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",s),a=new ZA),this.bones.push(a),this.boneInverses.push(new pt().fromArray(e.boneInverses[i]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const n=this.bones,i=this.boneInverses;for(let r=0,s=n.length;r<s;r++){const a=n[r];e.bones.push(a.uuid);const o=i[r];e.boneInverses.push(o.toArray())}return e}}class sd extends qt{constructor(e,n,i,r=1){super(e,n,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Kc=new pt,lN=new pt,ug=[],cN=new Hi,GZ=new pt,oh=new $n,lh=new Ni;class _j extends $n{constructor(e,n,i){super(e,n),this.isInstancedMesh=!0,this.instanceMatrix=new sd(new Float32Array(i*16),16),this.instanceColor=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let r=0;r<i;r++)this.setMatrixAt(r,GZ)}computeBoundingBox(){const e=this.geometry,n=this.count;this.boundingBox===null&&(this.boundingBox=new Hi),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<n;i++)this.getMatrixAt(i,Kc),cN.copy(e.boundingBox).applyMatrix4(Kc),this.boundingBox.union(cN)}computeBoundingSphere(){const e=this.geometry,n=this.count;this.boundingSphere===null&&(this.boundingSphere=new Ni),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<n;i++)this.getMatrixAt(i,Kc),lh.copy(e.boundingSphere).applyMatrix4(Kc),this.boundingSphere.union(lh)}copy(e,n){return super.copy(e,n),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,n){n.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,n){n.fromArray(this.instanceMatrix.array,e*16)}raycast(e,n){const i=this.matrixWorld,r=this.count;if(oh.geometry=this.geometry,oh.material=this.material,oh.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),lh.copy(this.boundingSphere),lh.applyMatrix4(i),e.ray.intersectsSphere(lh)!==!1))for(let s=0;s<r;s++){this.getMatrixAt(s,Kc),lN.multiplyMatrices(i,Kc),oh.matrixWorld=lN,oh.raycast(e,ug);for(let a=0,o=ug.length;a<o;a++){const c=ug[a];c.instanceId=s,c.object=this,n.push(c)}ug.length=0}}setColorAt(e,n){this.instanceColor===null&&(this.instanceColor=new sd(new Float32Array(this.instanceMatrix.count*3),3)),n.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,n){n.toArray(this.instanceMatrix.array,e*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}function qZ(t,e){return t.z-e.z}function XZ(t,e){return e.z-t.z}class $Z{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,n){const i=this.pool,r=this.list;this.index>=i.length&&i.push({start:-1,count:-1,z:-1});const s=i[this.index];r.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=n}reset(){this.list.length=0,this.index=0}}const Zc="batchId",no=new pt,uN=new pt,YZ=new pt,dN=new pt,zw=new op,dg=new Hi,fl=new Ni,ch=new H,Bw=new $Z,Ai=new $n,hg=[];function QZ(t,e,n=0){const i=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const r=t.count;for(let s=0;s<r;s++)for(let a=0;a<i;a++)e.setComponent(s+n,a,t.getComponent(s,a))}else e.array.set(t.array,n*i);e.needsUpdate=!0}class Sj extends $n{get maxGeometryCount(){return this._maxGeometryCount}constructor(e,n,i=n*2,r){super(new At,r),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._drawRanges=[],this._reservedRanges=[],this._visibility=[],this._active=[],this._bounds=[],this._maxGeometryCount=e,this._maxVertexCount=n,this._maxIndexCount=i,this._geometryInitialized=!1,this._geometryCount=0,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._visibilityChanged=!0,this._matricesTexture=null,this._initMatricesTexture()}_initMatricesTexture(){let e=Math.sqrt(this._maxGeometryCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const n=new Float32Array(e*e*4),i=new Xl(n,e,e,zi,ds);this._matricesTexture=i}_initializeGeometry(e){const n=this.geometry,i=this._maxVertexCount,r=this._maxGeometryCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const o in e.attributes){const c=e.getAttribute(o),{array:u,itemSize:f,normalized:p}=c,m=new u.constructor(i*f),g=new c.constructor(m,f,p);g.setUsage(c.usage),n.setAttribute(o,g)}if(e.getIndex()!==null){const o=i>65536?new Uint32Array(s):new Uint16Array(s);n.setIndex(new qt(o,1))}const a=r>65536?new Uint32Array(i):new Uint16Array(i);n.setAttribute(Zc,new qt(a,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(Zc))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Zc}"`);const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in n.attributes){if(i===Zc)continue;if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const r=e.getAttribute(i),s=n.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Hi);const e=this._geometryCount,n=this.boundingBox,i=this._active;n.makeEmpty();for(let r=0;r<e;r++)i[r]!==!1&&(this.getMatrixAt(r,no),this.getBoundingBoxAt(r,dg).applyMatrix4(no),n.union(dg))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Ni);const e=this._geometryCount,n=this.boundingSphere,i=this._active;n.makeEmpty();for(let r=0;r<e;r++)i[r]!==!1&&(this.getMatrixAt(r,no),this.getBoundingSphereAt(r,fl).applyMatrix4(no),n.union(fl))}addGeometry(e,n=-1,i=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._geometryCount>=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const a=this._reservedRanges,o=this._drawRanges,c=this._bounds;this._geometryCount!==0&&(s=a[a.length-1]),n===-1?r.vertexCount=e.getAttribute("position").count:r.vertexCount=n,s===null?r.vertexStart=0:r.vertexStart=s.vertexStart+s.vertexCount;const u=e.getIndex(),f=u!==null;if(f&&(i===-1?r.indexCount=u.count:r.indexCount=i,s===null?r.indexStart=0:r.indexStart=s.indexStart+s.indexCount),r.indexStart!==-1&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const p=this._visibility,m=this._active,g=this._matricesTexture,y=this._matricesTexture.image.data;p.push(!0),m.push(!0);const b=this._geometryCount;this._geometryCount++,YZ.toArray(y,b*16),g.needsUpdate=!0,a.push(r),o.push({start:f?r.indexStart:r.vertexStart,count:-1}),c.push({boxInitialized:!1,box:new Hi,sphereInitialized:!1,sphere:new Ni});const w=this.geometry.getAttribute(Zc);for(let x=0;x<r.vertexCount;x++)w.setX(r.vertexStart+x,b);return w.needsUpdate=!0,this.setGeometryAt(b,e),b}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const i=this.geometry,r=i.getIndex()!==null,s=i.getIndex(),a=n.getIndex(),o=this._reservedRanges[e];if(r&&a.count>o.indexCount||n.attributes.position.count>o.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const c=o.vertexStart,u=o.vertexCount;for(const g in i.attributes){if(g===Zc)continue;const y=n.getAttribute(g),b=i.getAttribute(g);QZ(y,b,c);const w=y.itemSize;for(let x=y.count,_=u;x<_;x++){const S=c+x;for(let M=0;M<w;M++)b.setComponent(S,M,0)}b.needsUpdate=!0}if(r){const g=o.indexStart;for(let y=0;y<a.count;y++)s.setX(g+y,c+a.getX(y));for(let y=a.count,b=o.indexCount;y<b;y++)s.setX(g+y,c);s.needsUpdate=!0}const f=this._bounds[e];n.boundingBox!==null?(f.box.copy(n.boundingBox),f.boxInitialized=!0):f.boxInitialized=!1,n.boundingSphere!==null?(f.sphere.copy(n.boundingSphere),f.sphereInitialized=!0):f.sphereInitialized=!1;const p=this._drawRanges[e],m=n.getAttribute("position");return p.count=r?a.count:m.count,this._visibilityChanged=!0,e}deleteGeometry(e){const n=this._active;return e>=n.length||n[e]===!1?this:(n[e]=!1,this._visibilityChanged=!0,this)}getBoundingBoxAt(e,n){if(this._active[e]===!1)return this;const r=this._bounds[e],s=r.box,a=this.geometry;if(r.boxInitialized===!1){s.makeEmpty();const o=a.index,c=a.attributes.position,u=this._drawRanges[e];for(let f=u.start,p=u.start+u.count;f<p;f++){let m=f;o&&(m=o.getX(m)),s.expandByPoint(ch.fromBufferAttribute(c,m))}r.boxInitialized=!0}return n.copy(s),n}getBoundingSphereAt(e,n){if(this._active[e]===!1)return this;const r=this._bounds[e],s=r.sphere,a=this.geometry;if(r.sphereInitialized===!1){s.makeEmpty(),this.getBoundingBoxAt(e,dg),dg.getCenter(s.center);const o=a.index,c=a.attributes.position,u=this._drawRanges[e];let f=0;for(let p=u.start,m=u.start+u.count;p<m;p++){let g=p;o&&(g=o.getX(g)),ch.fromBufferAttribute(c,g),f=Math.max(f,s.center.distanceToSquared(ch))}s.radius=Math.sqrt(f),r.sphereInitialized=!0}return n.copy(s),n}setMatrixAt(e,n){const i=this._active,r=this._matricesTexture,s=this._matricesTexture.image.data,a=this._geometryCount;return e>=a||i[e]===!1?this:(n.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,n){const i=this._active,r=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:n.fromArray(r,e*16)}setVisibleAt(e,n){const i=this._visibility,r=this._active,s=this._geometryCount;return e>=s||r[e]===!1||i[e]===n?this:(i[e]=n,this._visibilityChanged=!0,this)}getVisibleAt(e){const n=this._visibility,i=this._active,r=this._geometryCount;return e>=r||i[e]===!1?!1:n[e]}raycast(e,n){const i=this._visibility,r=this._active,s=this._drawRanges,a=this._geometryCount,o=this.matrixWorld,c=this.geometry;Ai.material=this.material,Ai.geometry.index=c.index,Ai.geometry.attributes=c.attributes,Ai.geometry.boundingBox===null&&(Ai.geometry.boundingBox=new Hi),Ai.geometry.boundingSphere===null&&(Ai.geometry.boundingSphere=new Ni);for(let u=0;u<a;u++){if(!i[u]||!r[u])continue;const f=s[u];Ai.geometry.setDrawRange(f.start,f.count),this.getMatrixAt(u,Ai.matrixWorld).premultiply(o),this.getBoundingBoxAt(u,Ai.geometry.boundingBox),this.getBoundingSphereAt(u,Ai.geometry.boundingSphere),Ai.raycast(e,hg);for(let p=0,m=hg.length;p<m;p++){const g=hg[p];g.object=this,g.batchId=u,n.push(g)}hg.length=0}Ai.material=null,Ai.geometry.index=null,Ai.geometry.attributes={},Ai.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._drawRanges=e._drawRanges.map(n=>({...n})),this._reservedRanges=e._reservedRanges.map(n=>({...n})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(n=>({boxInitialized:n.boxInitialized,box:n.box.clone(),sphereInitialized:n.sphereInitialized,sphere:n.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,n,i,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=r.getIndex(),o=a===null?1:a.array.BYTES_PER_ELEMENT,c=this._visibility,u=this._multiDrawStarts,f=this._multiDrawCounts,p=this._drawRanges,m=this.perObjectFrustumCulled;m&&(dN.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),zw.setFromProjectionMatrix(dN,e.isWebGPURenderer?nd:hs));let g=0;if(this.sortObjects){uN.copy(this.matrixWorld).invert(),ch.setFromMatrixPosition(i.matrixWorld).applyMatrix4(uN);for(let w=0,x=c.length;w<x;w++)if(c[w]){this.getMatrixAt(w,no),this.getBoundingSphereAt(w,fl).applyMatrix4(no);let _=!1;if(m&&(_=!zw.intersectsSphere(fl)),!_){const S=ch.distanceTo(fl.center);Bw.push(p[w],S)}}const y=Bw.list,b=this.customSort;b===null?y.sort(s.transparent?XZ:qZ):b.call(this,y,i);for(let w=0,x=y.length;w<x;w++){const _=y[w];u[g]=_.start*o,f[g]=_.count,g++}Bw.reset()}else for(let y=0,b=c.length;y<b;y++)if(c[y]){let w=!1;if(m&&(this.getMatrixAt(y,no),this.getBoundingSphereAt(y,fl).applyMatrix4(no),w=!zw.intersectsSphere(fl)),!w){const x=p[y];u[g]=x.start*o,f[g]=x.count,g++}}this._multiDrawCount=g,this._visibilityChanged=!1}onBeforeShadow(e,n,i,r,s,a){this.onBeforeRender(e,null,r,s,a)}}class qi extends Ii{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Ue(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const hN=new H,fN=new H,pN=new pt,Vw=new vd,fg=new Ni;class Vo extends Gt{constructor(e=new At,n=new qi){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,i=[0];for(let r=1,s=n.count;r<s;r++)hN.fromBufferAttribute(n,r-1),fN.fromBufferAttribute(n,r),i[r]=i[r-1],i[r]+=hN.distanceTo(fN);e.setAttribute("lineDistance",new Ye(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,n){const i=this.geometry,r=this.matrixWorld,s=e.params.Line.threshold,a=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),fg.copy(i.boundingSphere),fg.applyMatrix4(r),fg.radius+=s,e.ray.intersectsSphere(fg)===!1)return;pN.copy(r).invert(),Vw.copy(e.ray).applyMatrix4(pN);const o=s/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,u=new H,f=new H,p=new H,m=new H,g=this.isLineSegments?2:1,y=i.index,w=i.attributes.position;if(y!==null){const x=Math.max(0,a.start),_=Math.min(y.count,a.start+a.count);for(let S=x,M=_-1;S<M;S+=g){const E=y.getX(S),C=y.getX(S+1);if(u.fromBufferAttribute(w,E),f.fromBufferAttribute(w,C),Vw.distanceSqToSegment(u,f,m,p)>c)continue;m.applyMatrix4(this.matrixWorld);const D=e.ray.origin.distanceTo(m);D<e.near||D>e.far||n.push({distance:D,point:p.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}else{const x=Math.max(0,a.start),_=Math.min(w.count,a.start+a.count);for(let S=x,M=_-1;S<M;S+=g){if(u.fromBufferAttribute(w,S),f.fromBufferAttribute(w,S+1),Vw.distanceSqToSegment(u,f,m,p)>c)continue;m.applyMatrix4(this.matrixWorld);const C=e.ray.origin.distanceTo(m);C<e.near||C>e.far||n.push({distance:C,point:p.clone().applyMatrix4(this.matrixWorld),index:S,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=r.length;s<a;s++){const o=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}}const mN=new H,gN=new H;class Zs extends Vo{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,i=[];for(let r=0,s=n.count;r<s;r+=2)mN.fromBufferAttribute(n,r),gN.fromBufferAttribute(n,r+1),i[r]=r===0?0:i[r-1],i[r+1]=i[r]+mN.distanceTo(gN);e.setAttribute("lineDistance",new Ye(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Aj extends Vo{constructor(e,n){super(e,n),this.isLineLoop=!0,this.type="LineLoop"}}class JA extends Ii{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Ue(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const xN=new pt,w_=new vd,pg=new Ni,mg=new H;class Mj extends Gt{constructor(e=new At,n=new JA){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,n){const i=this.geometry,r=this.matrixWorld,s=e.params.Points.threshold,a=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),pg.copy(i.boundingSphere),pg.applyMatrix4(r),pg.radius+=s,e.ray.intersectsSphere(pg)===!1)return;xN.copy(r).invert(),w_.copy(e.ray).applyMatrix4(xN);const o=s/((this.scale.x+this.scale.y+this.scale.z)/3),c=o*o,u=i.index,p=i.attributes.position;if(u!==null){const m=Math.max(0,a.start),g=Math.min(u.count,a.start+a.count);for(let y=m,b=g;y<b;y++){const w=u.getX(y);mg.fromBufferAttribute(p,w),yN(mg,w,c,r,e,n,this)}}else{const m=Math.max(0,a.start),g=Math.min(p.count,a.start+a.count);for(let y=m,b=g;y<b;y++)mg.fromBufferAttribute(p,y),yN(mg,y,c,r,e,n,this)}}updateMorphTargets(){const n=this.geometry.morphAttributes,i=Object.keys(n);if(i.length>0){const r=n[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=r.length;s<a;s++){const o=r[s].name||String(s);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=s}}}}}function yN(t,e,n,i,r,s,a){const o=w_.distanceSqToPoint(t);if(o<n){const c=new H;w_.closestPointToPoint(t,c),c.applyMatrix4(i);const u=r.ray.origin.distanceTo(c);if(u<r.near||u>r.far)return;s.push({distance:u,distanceToRay:Math.sqrt(o),point:c,index:e,face:null,object:a})}}class KZ extends Un{constructor(e,n,i,r,s,a,o,c,u){super(e,n,i,r,s,a,o,c,u),this.isVideoTexture=!0,this.minFilter=a!==void 0?a:jn,this.magFilter=s!==void 0?s:jn,this.generateMipmaps=!1;const f=this;function p(){f.needsUpdate=!0,e.requestVideoFrameCallback(p)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(p)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class ZZ extends Un{constructor(e,n){super({width:e,height:n}),this.isFramebufferTexture=!0,this.magFilter=Ln,this.minFilter=Ln,this.generateMipmaps=!1,this.needsUpdate=!0}}class qy extends Un{constructor(e,n,i,r,s,a,o,c,u,f,p,m){super(null,a,o,c,u,f,r,s,p,m),this.isCompressedTexture=!0,this.image={width:n,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class JZ extends qy{constructor(e,n,i,r,s,a){super(e,n,i,s,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Ci}}class eJ extends qy{constructor(e,n,i){super(void 0,e[0].width,e[0].height,n,i,La),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class tJ extends Un{constructor(e,n,i,r,s,a,o,c,u){super(e,n,i,r,s,a,o,c,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class vs{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const i=this.getUtoTmapping(e);return this.getPoint(i,n)}getPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return n}getSpacedPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPointAt(i/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let i,r=this.getPoint(0),s=0;n.push(0);for(let a=1;a<=e;a++)i=this.getPoint(a/e),s+=i.distanceTo(r),n.push(s),r=i;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const i=this.getLengths();let r=0;const s=i.length;let a;n?a=n:a=e*i[s-1];let o=0,c=s-1,u;for(;o<=c;)if(r=Math.floor(o+(c-o)/2),u=i[r]-a,u<0)o=r+1;else if(u>0)c=r-1;else{c=r;break}if(r=c,i[r]===a)return r/(s-1);const f=i[r],m=i[r+1]-f,g=(a-f)/m;return(r+g)/(s-1)}getTangent(e,n){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const a=this.getPoint(r),o=this.getPoint(s),c=n||(a.isVector2?new ye:new H);return c.copy(o).sub(a).normalize(),c}getTangentAt(e,n){const i=this.getUtoTmapping(e);return this.getTangent(i,n)}computeFrenetFrames(e,n){const i=new H,r=[],s=[],a=[],o=new H,c=new pt;for(let g=0;g<=e;g++){const y=g/e;r[g]=this.getTangentAt(y,new H)}s[0]=new H,a[0]=new H;let u=Number.MAX_VALUE;const f=Math.abs(r[0].x),p=Math.abs(r[0].y),m=Math.abs(r[0].z);f<=u&&(u=f,i.set(1,0,0)),p<=u&&(u=p,i.set(0,1,0)),m<=u&&i.set(0,0,1),o.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],o),a[0].crossVectors(r[0],s[0]);for(let g=1;g<=e;g++){if(s[g]=s[g-1].clone(),a[g]=a[g-1].clone(),o.crossVectors(r[g-1],r[g]),o.length()>Number.EPSILON){o.normalize();const y=Math.acos(Pn(r[g-1].dot(r[g]),-1,1));s[g].applyMatrix4(c.makeRotationAxis(o,y))}a[g].crossVectors(r[g],s[g])}if(n===!0){let g=Math.acos(Pn(s[0].dot(s[e]),-1,1));g/=e,r[0].dot(o.crossVectors(s[0],s[e]))>0&&(g=-g);for(let y=1;y<=e;y++)s[y].applyMatrix4(c.makeRotationAxis(r[y],g*y)),a[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Xy extends vs{constructor(e=0,n=0,i=1,r=1,s=0,a=Math.PI*2,o=!1,c=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=a,this.aClockwise=o,this.aRotation=c}getPoint(e,n){const i=n||new ye,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const a=Math.abs(s)<Number.EPSILON;for(;s<0;)s+=r;for(;s>r;)s-=r;s<Number.EPSILON&&(a?s=0:s=r),this.aClockwise===!0&&!a&&(s===r?s=-r:s=s-r);const o=this.aStartAngle+e*s;let c=this.aX+this.xRadius*Math.cos(o),u=this.aY+this.yRadius*Math.sin(o);if(this.aRotation!==0){const f=Math.cos(this.aRotation),p=Math.sin(this.aRotation),m=c-this.aX,g=u-this.aY;c=m*f-g*p+this.aX,u=m*p+g*f+this.aY}return i.set(c,u)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class Tj extends Xy{constructor(e,n,i,r,s,a){super(e,n,i,i,r,s,a),this.isArcCurve=!0,this.type="ArcCurve"}}function eM(){let t=0,e=0,n=0,i=0;function r(s,a,o,c){t=s,e=o,n=-3*s+3*a-2*o-c,i=2*s-2*a+o+c}return{initCatmullRom:function(s,a,o,c,u){r(a,o,u*(o-s),u*(c-a))},initNonuniformCatmullRom:function(s,a,o,c,u,f,p){let m=(a-s)/u-(o-s)/(u+f)+(o-a)/f,g=(o-a)/f-(c-a)/(f+p)+(c-o)/p;m*=f,g*=f,r(a,o,m,g)},calc:function(s){const a=s*s,o=a*s;return t+e*s+n*a+i*o}}}const gg=new H,Hw=new eM,Ww=new eM,Gw=new eM;class Ej extends vs{constructor(e=[],n=!1,i="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=n,this.curveType=i,this.tension=r}getPoint(e,n=new H){const i=n,r=this.points,s=r.length,a=(s-(this.closed?0:1))*e;let o=Math.floor(a),c=a-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/s)+1)*s:c===0&&o===s-1&&(o=s-2,c=1);let u,f;this.closed||o>0?u=r[(o-1)%s]:(gg.subVectors(r[0],r[1]).add(r[0]),u=gg);const p=r[o%s],m=r[(o+1)%s];if(this.closed||o+2<s?f=r[(o+2)%s]:(gg.subVectors(r[s-1],r[s-2]).add(r[s-1]),f=gg),this.curveType==="centripetal"||this.curveType==="chordal"){const g=this.curveType==="chordal"?.5:.25;let y=Math.pow(u.distanceToSquared(p),g),b=Math.pow(p.distanceToSquared(m),g),w=Math.pow(m.distanceToSquared(f),g);b<1e-4&&(b=1),y<1e-4&&(y=b),w<1e-4&&(w=b),Hw.initNonuniformCatmullRom(u.x,p.x,m.x,f.x,y,b,w),Ww.initNonuniformCatmullRom(u.y,p.y,m.y,f.y,y,b,w),Gw.initNonuniformCatmullRom(u.z,p.z,m.z,f.z,y,b,w)}else this.curveType==="catmullrom"&&(Hw.initCatmullRom(u.x,p.x,m.x,f.x,this.tension),Ww.initCatmullRom(u.y,p.y,m.y,f.y,this.tension),Gw.initCatmullRom(u.z,p.z,m.z,f.z,this.tension));return i.set(Hw.calc(c),Ww.calc(c),Gw.calc(c)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(r.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,i=this.points.length;n<i;n++){const r=this.points[n];e.points.push(r.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new H().fromArray(r))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function vN(t,e,n,i,r){const s=(i-e)*.5,a=(r-n)*.5,o=t*t,c=t*o;return(2*n-2*i+s+a)*c+(-3*n+3*i-2*s-a)*o+s*t+n}function nJ(t,e){const n=1-t;return n*n*e}function iJ(t,e){return 2*(1-t)*t*e}function rJ(t,e){return t*t*e}function Uh(t,e,n,i){return nJ(t,e)+iJ(t,n)+rJ(t,i)}function sJ(t,e){const n=1-t;return n*n*n*e}function aJ(t,e){const n=1-t;return 3*n*n*t*e}function oJ(t,e){return 3*(1-t)*t*t*e}function lJ(t,e){return t*t*t*e}function zh(t,e,n,i,r){return sJ(t,e)+aJ(t,n)+oJ(t,i)+lJ(t,r)}class tM extends vs{constructor(e=new ye,n=new ye,i=new ye,r=new ye){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new ye){const i=n,r=this.v0,s=this.v1,a=this.v2,o=this.v3;return i.set(zh(e,r.x,s.x,a.x,o.x),zh(e,r.y,s.y,a.y,o.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Cj extends vs{constructor(e=new H,n=new H,i=new H,r=new H){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=n,this.v2=i,this.v3=r}getPoint(e,n=new H){const i=n,r=this.v0,s=this.v1,a=this.v2,o=this.v3;return i.set(zh(e,r.x,s.x,a.x,o.x),zh(e,r.y,s.y,a.y,o.y),zh(e,r.z,s.z,a.z,o.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class nM extends vs{constructor(e=new ye,n=new ye){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=n}getPoint(e,n=new ye){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new ye){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Pj extends vs{constructor(e=new H,n=new H){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=n}getPoint(e,n=new H){const i=n;return e===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(e).add(this.v1)),i}getPointAt(e,n){return this.getPoint(e,n)}getTangent(e,n=new H){return n.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,n){return this.getTangent(e,n)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class iM extends vs{constructor(e=new ye,n=new ye,i=new ye){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new ye){const i=n,r=this.v0,s=this.v1,a=this.v2;return i.set(Uh(e,r.x,s.x,a.x),Uh(e,r.y,s.y,a.y)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class rM extends vs{constructor(e=new H,n=new H,i=new H){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=n,this.v2=i}getPoint(e,n=new H){const i=n,r=this.v0,s=this.v1,a=this.v2;return i.set(Uh(e,r.x,s.x,a.x),Uh(e,r.y,s.y,a.y),Uh(e,r.z,s.z,a.z)),i}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class sM extends vs{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,n=new ye){const i=n,r=this.points,s=(r.length-1)*e,a=Math.floor(s),o=s-a,c=r[a===0?a:a-1],u=r[a],f=r[a>r.length-2?r.length-1:a+1],p=r[a>r.length-3?r.length-1:a+2];return i.set(vN(o,c.x,u.x,f.x,p.x),vN(o,c.y,u.y,f.y,p.y)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let n=0,i=this.points.length;n<i;n++){const r=this.points[n];e.points.push(r.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let n=0,i=e.points.length;n<i;n++){const r=e.points[n];this.points.push(new ye().fromArray(r))}return this}}var Xx=Object.freeze({__proto__:null,ArcCurve:Tj,CatmullRomCurve3:Ej,CubicBezierCurve:tM,CubicBezierCurve3:Cj,EllipseCurve:Xy,LineCurve:nM,LineCurve3:Pj,QuadraticBezierCurve:iM,QuadraticBezierCurve3:rM,SplineCurve:sM});class Nj extends vs{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),n=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(n)){const i=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Xx[i](n,e))}return this}getPoint(e,n){const i=e*this.getLength(),r=this.getCurveLengths();let s=0;for(;s<r.length;){if(r[s]>=i){const a=r[s]-i,o=this.curves[s],c=o.getLength(),u=c===0?0:1-a/c;return o.getPointAt(u,n)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let i=0,r=this.curves.length;i<r;i++)n+=this.curves[i].getLength(),e.push(n);return this.cacheLengths=e,e}getSpacedPoints(e=40){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return this.autoClose&&n.push(n[0]),n}getPoints(e=12){const n=[];let i;for(let r=0,s=this.curves;r<s.length;r++){const a=s[r],o=a.isEllipseCurve?e*2:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,c=a.getPoints(o);for(let u=0;u<c.length;u++){const f=c[u];i&&i.equals(f)||(n.push(f),i=f)}}return this.autoClose&&n.length>1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(r.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let n=0,i=this.curves.length;n<i;n++){const r=this.curves[n];e.curves.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let n=0,i=e.curves.length;n<i;n++){const r=e.curves[n];this.curves.push(new Xx[r.type]().fromJSON(r))}return this}}class Rf extends Nj{constructor(e){super(),this.type="Path",this.currentPoint=new ye,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let n=1,i=e.length;n<i;n++)this.lineTo(e[n].x,e[n].y);return this}moveTo(e,n){return this.currentPoint.set(e,n),this}lineTo(e,n){const i=new nM(this.currentPoint.clone(),new ye(e,n));return this.curves.push(i),this.currentPoint.set(e,n),this}quadraticCurveTo(e,n,i,r){const s=new iM(this.currentPoint.clone(),new ye(e,n),new ye(i,r));return this.curves.push(s),this.currentPoint.set(i,r),this}bezierCurveTo(e,n,i,r,s,a){const o=new tM(this.currentPoint.clone(),new ye(e,n),new ye(i,r),new ye(s,a));return this.curves.push(o),this.currentPoint.set(s,a),this}splineThru(e){const n=[this.currentPoint.clone()].concat(e),i=new sM(n);return this.curves.push(i),this.currentPoint.copy(e[e.length-1]),this}arc(e,n,i,r,s,a){const o=this.currentPoint.x,c=this.currentPoint.y;return this.absarc(e+o,n+c,i,r,s,a),this}absarc(e,n,i,r,s,a){return this.absellipse(e,n,i,i,r,s,a),this}ellipse(e,n,i,r,s,a,o,c){const u=this.currentPoint.x,f=this.currentPoint.y;return this.absellipse(e+u,n+f,i,r,s,a,o,c),this}absellipse(e,n,i,r,s,a,o,c){const u=new Xy(e,n,i,r,s,a,o,c);if(this.curves.length>0){const p=u.getPoint(0);p.equals(this.currentPoint)||this.lineTo(p.x,p.y)}this.curves.push(u);const f=u.getPoint(1);return this.currentPoint.copy(f),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class up extends At{constructor(e=[new ye(0,-.5),new ye(.5,0),new ye(0,.5)],n=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:n,phiStart:i,phiLength:r},n=Math.floor(n),r=Pn(r,0,Math.PI*2);const s=[],a=[],o=[],c=[],u=[],f=1/n,p=new H,m=new ye,g=new H,y=new H,b=new H;let w=0,x=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:w=e[_+1].x-e[_].x,x=e[_+1].y-e[_].y,g.x=x*1,g.y=-w,g.z=x*0,b.copy(g),g.normalize(),c.push(g.x,g.y,g.z);break;case e.length-1:c.push(b.x,b.y,b.z);break;default:w=e[_+1].x-e[_].x,x=e[_+1].y-e[_].y,g.x=x*1,g.y=-w,g.z=x*0,y.copy(g),g.x+=b.x,g.y+=b.y,g.z+=b.z,g.normalize(),c.push(g.x,g.y,g.z),b.copy(y)}for(let _=0;_<=n;_++){const S=i+_*f*r,M=Math.sin(S),E=Math.cos(S);for(let C=0;C<=e.length-1;C++){p.x=e[C].x*M,p.y=e[C].y,p.z=e[C].x*E,a.push(p.x,p.y,p.z),m.x=_/n,m.y=C/(e.length-1),o.push(m.x,m.y);const N=c[3*C+0]*M,D=c[3*C+1],R=c[3*C+0]*E;u.push(N,D,R)}}for(let _=0;_<n;_++)for(let S=0;S<e.length-1;S++){const M=S+_*e.length,E=M,C=M+e.length,N=M+e.length+1,D=M+1;s.push(E,C,D),s.push(N,D,C)}this.setIndex(s),this.setAttribute("position",new Ye(a,3)),this.setAttribute("uv",new Ye(o,2)),this.setAttribute("normal",new Ye(u,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new up(e.points,e.segments,e.phiStart,e.phiLength)}}class $y extends up{constructor(e=1,n=1,i=4,r=8){const s=new Rf;s.absarc(0,-n/2,e,Math.PI*1.5,0),s.absarc(0,n/2,e,0,Math.PI*.5),super(s.getPoints(i),r),this.type="CapsuleGeometry",this.parameters={radius:e,length:n,capSegments:i,radialSegments:r}}static fromJSON(e){return new $y(e.radius,e.length,e.capSegments,e.radialSegments)}}class Yy extends At{constructor(e=1,n=32,i=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:n,thetaStart:i,thetaLength:r},n=Math.max(3,n);const s=[],a=[],o=[],c=[],u=new H,f=new ye;a.push(0,0,0),o.push(0,0,1),c.push(.5,.5);for(let p=0,m=3;p<=n;p++,m+=3){const g=i+p/n*r;u.x=e*Math.cos(g),u.y=e*Math.sin(g),a.push(u.x,u.y,u.z),o.push(0,0,1),f.x=(a[m]/e+1)/2,f.y=(a[m+1]/e+1)/2,c.push(f.x,f.y)}for(let p=1;p<=n;p++)s.push(p,p+1,0);this.setIndex(s),this.setAttribute("position",new Ye(a,3)),this.setAttribute("normal",new Ye(o,3)),this.setAttribute("uv",new Ye(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Yy(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class bd extends At{constructor(e=1,n=1,i=1,r=32,s=1,a=!1,o=0,c=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:n,height:i,radialSegments:r,heightSegments:s,openEnded:a,thetaStart:o,thetaLength:c};const u=this;r=Math.floor(r),s=Math.floor(s);const f=[],p=[],m=[],g=[];let y=0;const b=[],w=i/2;let x=0;_(),a===!1&&(e>0&&S(!0),n>0&&S(!1)),this.setIndex(f),this.setAttribute("position",new Ye(p,3)),this.setAttribute("normal",new Ye(m,3)),this.setAttribute("uv",new Ye(g,2));function _(){const M=new H,E=new H;let C=0;const N=(n-e)/i;for(let D=0;D<=s;D++){const R=[],k=D/s,V=k*(n-e)+e;for(let G=0;G<=r;G++){const ie=G/r,z=ie*c+o,$=Math.sin(z),X=Math.cos(z);E.x=V*$,E.y=-k*i+w,E.z=V*X,p.push(E.x,E.y,E.z),M.set($,N,X).normalize(),m.push(M.x,M.y,M.z),g.push(ie,1-k),R.push(y++)}b.push(R)}for(let D=0;D<r;D++)for(let R=0;R<s;R++){const k=b[R][D],V=b[R+1][D],G=b[R+1][D+1],ie=b[R][D+1];f.push(k,V,ie),f.push(V,G,ie),C+=6}u.addGroup(x,C,0),x+=C}function S(M){const E=y,C=new ye,N=new H;let D=0;const R=M===!0?e:n,k=M===!0?1:-1;for(let G=1;G<=r;G++)p.push(0,w*k,0),m.push(0,k,0),g.push(.5,.5),y++;const V=y;for(let G=0;G<=r;G++){const z=G/r*c+o,$=Math.cos(z),X=Math.sin(z);N.x=R*X,N.y=w*k,N.z=R*$,p.push(N.x,N.y,N.z),m.push(0,k,0),C.x=$*.5+.5,C.y=X*.5*k+.5,g.push(C.x,C.y),y++}for(let G=0;G<r;G++){const ie=E+G,z=V+G;M===!0?f.push(z,z+1,ie):f.push(z+1,z,ie),D+=3}u.addGroup(x,D,M===!0?1:2),x+=D}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new bd(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Qy extends bd{constructor(e=1,n=1,i=32,r=1,s=!1,a=0,o=Math.PI*2){super(0,e,n,i,r,s,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:n,radialSegments:i,heightSegments:r,openEnded:s,thetaStart:a,thetaLength:o}}static fromJSON(e){return new Qy(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Ko extends At{constructor(e=[],n=[],i=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:n,radius:i,detail:r};const s=[],a=[];o(r),u(i),f(),this.setAttribute("position",new Ye(s,3)),this.setAttribute("normal",new Ye(s.slice(),3)),this.setAttribute("uv",new Ye(a,2)),r===0?this.computeVertexNormals():this.normalizeNormals();function o(_){const S=new H,M=new H,E=new H;for(let C=0;C<n.length;C+=3)g(n[C+0],S),g(n[C+1],M),g(n[C+2],E),c(S,M,E,_)}function c(_,S,M,E){const C=E+1,N=[];for(let D=0;D<=C;D++){N[D]=[];const R=_.clone().lerp(M,D/C),k=S.clone().lerp(M,D/C),V=C-D;for(let G=0;G<=V;G++)G===0&&D===C?N[D][G]=R:N[D][G]=R.clone().lerp(k,G/V)}for(let D=0;D<C;D++)for(let R=0;R<2*(C-D)-1;R++){const k=Math.floor(R/2);R%2===0?(m(N[D][k+1]),m(N[D+1][k]),m(N[D][k])):(m(N[D][k+1]),m(N[D+1][k+1]),m(N[D+1][k]))}}function u(_){const S=new H;for(let M=0;M<s.length;M+=3)S.x=s[M+0],S.y=s[M+1],S.z=s[M+2],S.normalize().multiplyScalar(_),s[M+0]=S.x,s[M+1]=S.y,s[M+2]=S.z}function f(){const _=new H;for(let S=0;S<s.length;S+=3){_.x=s[S+0],_.y=s[S+1],_.z=s[S+2];const M=w(_)/2/Math.PI+.5,E=x(_)/Math.PI+.5;a.push(M,1-E)}y(),p()}function p(){for(let _=0;_<a.length;_+=6){const S=a[_+0],M=a[_+2],E=a[_+4],C=Math.max(S,M,E),N=Math.min(S,M,E);C>.9&&N<.1&&(S<.2&&(a[_+0]+=1),M<.2&&(a[_+2]+=1),E<.2&&(a[_+4]+=1))}}function m(_){s.push(_.x,_.y,_.z)}function g(_,S){const M=_*3;S.x=e[M+0],S.y=e[M+1],S.z=e[M+2]}function y(){const _=new H,S=new H,M=new H,E=new H,C=new ye,N=new ye,D=new ye;for(let R=0,k=0;R<s.length;R+=9,k+=6){_.set(s[R+0],s[R+1],s[R+2]),S.set(s[R+3],s[R+4],s[R+5]),M.set(s[R+6],s[R+7],s[R+8]),C.set(a[k+0],a[k+1]),N.set(a[k+2],a[k+3]),D.set(a[k+4],a[k+5]),E.copy(_).add(S).add(M).divideScalar(3);const V=w(E);b(C,k+0,_,V),b(N,k+2,S,V),b(D,k+4,M,V)}}function b(_,S,M,E){E<0&&_.x===1&&(a[S]=_.x-1),M.x===0&&M.z===0&&(a[S]=E/2/Math.PI+.5)}function w(_){return Math.atan2(_.z,-_.x)}function x(_){return Math.atan2(-_.y,Math.sqrt(_.x*_.x+_.z*_.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ko(e.vertices,e.indices,e.radius,e.details)}}class Ky extends Ko{constructor(e=1,n=0){const i=(1+Math.sqrt(5))/2,r=1/i,s=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-i,0,-r,i,0,r,-i,0,r,i,-r,-i,0,-r,i,0,r,-i,0,r,i,0,-i,0,-r,i,0,-r,-i,0,r,i,0,r],a=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(s,a,e,n),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new Ky(e.radius,e.detail)}}const xg=new H,yg=new H,qw=new H,vg=new er;class Rj extends At{constructor(e=null,n=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:n},e!==null){const r=Math.pow(10,4),s=Math.cos(Gl*n),a=e.getIndex(),o=e.getAttribute("position"),c=a?a.count:o.count,u=[0,0,0],f=["a","b","c"],p=new Array(3),m={},g=[];for(let y=0;y<c;y+=3){a?(u[0]=a.getX(y),u[1]=a.getX(y+1),u[2]=a.getX(y+2)):(u[0]=y,u[1]=y+1,u[2]=y+2);const{a:b,b:w,c:x}=vg;if(b.fromBufferAttribute(o,u[0]),w.fromBufferAttribute(o,u[1]),x.fromBufferAttribute(o,u[2]),vg.getNormal(qw),p[0]=`${Math.round(b.x*r)},${Math.round(b.y*r)},${Math.round(b.z*r)}`,p[1]=`${Math.round(w.x*r)},${Math.round(w.y*r)},${Math.round(w.z*r)}`,p[2]=`${Math.round(x.x*r)},${Math.round(x.y*r)},${Math.round(x.z*r)}`,!(p[0]===p[1]||p[1]===p[2]||p[2]===p[0]))for(let _=0;_<3;_++){const S=(_+1)%3,M=p[_],E=p[S],C=vg[f[_]],N=vg[f[S]],D=`${M}_${E}`,R=`${E}_${M}`;R in m&&m[R]?(qw.dot(m[R].normal)<=s&&(g.push(C.x,C.y,C.z),g.push(N.x,N.y,N.z)),m[R]=null):D in m||(m[D]={index0:u[_],index1:u[S],normal:qw.clone()})}}for(const y in m)if(m[y]){const{index0:b,index1:w}=m[y];xg.fromBufferAttribute(o,b),yg.fromBufferAttribute(o,w),g.push(xg.x,xg.y,xg.z),g.push(yg.x,yg.y,yg.z)}this.setAttribute("position",new Ye(g,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class $l extends Rf{constructor(e){super(e),this.uuid=_r(),this.type="Shape",this.holes=[]}getPointsHoles(e){const n=[];for(let i=0,r=this.holes.length;i<r;i++)n[i]=this.holes[i].getPoints(e);return n}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(r.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let n=0,i=this.holes.length;n<i;n++){const r=this.holes[n];e.holes.push(r.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let n=0,i=e.holes.length;n<i;n++){const r=e.holes[n];this.holes.push(new Rf().fromJSON(r))}return this}}const cJ={triangulate:function(t,e,n=2){const i=e&&e.length,r=i?e[0]*n:t.length;let s=Ij(t,0,r,n,!0);const a=[];if(!s||s.next===s.prev)return a;let o,c,u,f,p,m,g;if(i&&(s=pJ(t,e,s,n)),t.length>80*n){o=u=t[0],c=f=t[1];for(let y=n;y<r;y+=n)p=t[y],m=t[y+1],p<o&&(o=p),m<c&&(c=m),p>u&&(u=p),m>f&&(f=m);g=Math.max(u-o,f-c),g=g!==0?32767/g:0}return If(s,a,n,o,c,g,0),a}};function Ij(t,e,n,i,r){let s,a;if(r===MJ(t,e,n,i)>0)for(s=e;s<n;s+=i)a=wN(s,t[s],t[s+1],a);else for(s=n-i;s>=e;s-=i)a=wN(s,t[s],t[s+1],a);return a&&Zy(a,a.next)&&(Lf(a),a=a.next),a}function ac(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(Zy(n,n.next)||wn(n.prev,n,n.next)===0)){if(Lf(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function If(t,e,n,i,r,s,a){if(!t)return;!a&&s&&vJ(t,i,r,s);let o=t,c,u;for(;t.prev!==t.next;){if(c=t.prev,u=t.next,s?dJ(t,i,r,s):uJ(t)){e.push(c.i/n|0),e.push(t.i/n|0),e.push(u.i/n|0),Lf(t),t=u.next,o=u.next;continue}if(t=u,t===o){a?a===1?(t=hJ(ac(t),e,n),If(t,e,n,i,r,s,2)):a===2&&fJ(t,e,n,i,r,s):If(ac(t),e,n,i,r,s,1);break}}}function uJ(t){const e=t.prev,n=t,i=t.next;if(wn(e,n,i)>=0)return!1;const r=e.x,s=n.x,a=i.x,o=e.y,c=n.y,u=i.y,f=r<s?r<a?r:a:s<a?s:a,p=o<c?o<u?o:u:c<u?c:u,m=r>s?r>a?r:a:s>a?s:a,g=o>c?o>u?o:u:c>u?c:u;let y=i.next;for(;y!==e;){if(y.x>=f&&y.x<=m&&y.y>=p&&y.y<=g&&Au(r,o,s,c,a,u,y.x,y.y)&&wn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function dJ(t,e,n,i){const r=t.prev,s=t,a=t.next;if(wn(r,s,a)>=0)return!1;const o=r.x,c=s.x,u=a.x,f=r.y,p=s.y,m=a.y,g=o<c?o<u?o:u:c<u?c:u,y=f<p?f<m?f:m:p<m?p:m,b=o>c?o>u?o:u:c>u?c:u,w=f>p?f>m?f:m:p>m?p:m,x=b_(g,y,e,n,i),_=b_(b,w,e,n,i);let S=t.prevZ,M=t.nextZ;for(;S&&S.z>=x&&M&&M.z<=_;){if(S.x>=g&&S.x<=b&&S.y>=y&&S.y<=w&&S!==r&&S!==a&&Au(o,f,c,p,u,m,S.x,S.y)&&wn(S.prev,S,S.next)>=0||(S=S.prevZ,M.x>=g&&M.x<=b&&M.y>=y&&M.y<=w&&M!==r&&M!==a&&Au(o,f,c,p,u,m,M.x,M.y)&&wn(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;S&&S.z>=x;){if(S.x>=g&&S.x<=b&&S.y>=y&&S.y<=w&&S!==r&&S!==a&&Au(o,f,c,p,u,m,S.x,S.y)&&wn(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;M&&M.z<=_;){if(M.x>=g&&M.x<=b&&M.y>=y&&M.y<=w&&M!==r&&M!==a&&Au(o,f,c,p,u,m,M.x,M.y)&&wn(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function hJ(t,e,n){let i=t;do{const r=i.prev,s=i.next.next;!Zy(r,s)&&kj(r,i,i.next,s)&&kf(r,s)&&kf(s,r)&&(e.push(r.i/n|0),e.push(i.i/n|0),e.push(s.i/n|0),Lf(i),Lf(i.next),i=t=s),i=i.next}while(i!==t);return ac(i)}function fJ(t,e,n,i,r,s){let a=t;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&_J(a,o)){let c=Lj(a,o);a=ac(a,a.next),c=ac(c,c.next),If(a,e,n,i,r,s,0),If(c,e,n,i,r,s,0);return}o=o.next}a=a.next}while(a!==t)}function pJ(t,e,n,i){const r=[];let s,a,o,c,u;for(s=0,a=e.length;s<a;s++)o=e[s]*i,c=s<a-1?e[s+1]*i:t.length,u=Ij(t,o,c,i,!1),u===u.next&&(u.steiner=!0),r.push(bJ(u));for(r.sort(mJ),s=0;s<r.length;s++)n=gJ(r[s],n);return n}function mJ(t,e){return t.x-e.x}function gJ(t,e){const n=xJ(t,e);if(!n)return e;const i=Lj(n,t);return ac(i,i.next),ac(n,n.next)}function xJ(t,e){let n=e,i=-1/0,r;const s=t.x,a=t.y;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){const m=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(m<=s&&m>i&&(i=m,r=n.x<n.next.x?n:n.next,m===s))return r}n=n.next}while(n!==e);if(!r)return null;const o=r,c=r.x,u=r.y;let f=1/0,p;n=r;do s>=n.x&&n.x>=c&&s!==n.x&&Au(a<u?s:i,a,c,u,a<u?i:s,a,n.x,n.y)&&(p=Math.abs(a-n.y)/(s-n.x),kf(n,t)&&(p<f||p===f&&(n.x>r.x||n.x===r.x&&yJ(r,n)))&&(r=n,f=p)),n=n.next;while(n!==o);return r}function yJ(t,e){return wn(t.prev,t,e.prev)<0&&wn(e.next,t,t.next)<0}function vJ(t,e,n,i){let r=t;do r.z===0&&(r.z=b_(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,wJ(r)}function wJ(t){let e,n,i,r,s,a,o,c,u=1;do{for(n=t,t=null,s=null,a=0;n;){for(a++,i=n,o=0,e=0;e<u&&(o++,i=i.nextZ,!!i);e++);for(c=u;o>0||c>0&&i;)o!==0&&(c===0||!i||n.z<=i.z)?(r=n,n=n.nextZ,o--):(r=i,i=i.nextZ,c--),s?s.nextZ=r:t=r,r.prevZ=s,s=r;n=i}s.nextZ=null,u*=2}while(a>1);return t}function b_(t,e,n,i,r){return t=(t-n)*r|0,e=(e-i)*r|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function bJ(t){let e=t,n=t;do(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next;while(e!==t);return n}function Au(t,e,n,i,r,s,a,o){return(r-a)*(e-o)>=(t-a)*(s-o)&&(t-a)*(i-o)>=(n-a)*(e-o)&&(n-a)*(s-o)>=(r-a)*(i-o)}function _J(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!SJ(t,e)&&(kf(t,e)&&kf(e,t)&&AJ(t,e)&&(wn(t.prev,t,e.prev)||wn(t,e.prev,e))||Zy(t,e)&&wn(t.prev,t,t.next)>0&&wn(e.prev,e,e.next)>0)}function wn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Zy(t,e){return t.x===e.x&&t.y===e.y}function kj(t,e,n,i){const r=bg(wn(t,e,n)),s=bg(wn(t,e,i)),a=bg(wn(n,i,t)),o=bg(wn(n,i,e));return!!(r!==s&&a!==o||r===0&&wg(t,n,e)||s===0&&wg(t,i,e)||a===0&&wg(n,t,i)||o===0&&wg(n,e,i))}function wg(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function bg(t){return t>0?1:t<0?-1:0}function SJ(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&kj(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function kf(t,e){return wn(t.prev,t,t.next)<0?wn(t,e,t.next)>=0&&wn(t,t.prev,e)>=0:wn(t,e,t.prev)<0||wn(t,t.next,e)<0}function AJ(t,e){let n=t,i=!1;const r=(t.x+e.x)/2,s=(t.y+e.y)/2;do n.y>s!=n.next.y>s&&n.next.y!==n.y&&r<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function Lj(t,e){const n=new __(t.i,t.x,t.y),i=new __(e.i,e.x,e.y),r=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,s.next=i,i.prev=s,i}function wN(t,e,n,i){const r=new __(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function Lf(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function __(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function MJ(t,e,n,i){let r=0;for(let s=e,a=n-i;s<n;s+=i)r+=(t[a]-t[s])*(t[s+1]+t[a+1]),a=s;return r}class qs{static area(e){const n=e.length;let i=0;for(let r=n-1,s=0;s<n;r=s++)i+=e[r].x*e[s].y-e[s].x*e[r].y;return i*.5}static isClockWise(e){return qs.area(e)<0}static triangulateShape(e,n){const i=[],r=[],s=[];bN(e),_N(i,e);let a=e.length;n.forEach(bN);for(let c=0;c<n.length;c++)r.push(a),a+=n[c].length,_N(i,n[c]);const o=cJ.triangulate(i,r);for(let c=0;c<o.length;c+=3)s.push(o.slice(c,c+3));return s}}function bN(t){const e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function _N(t,e){for(let n=0;n<e.length;n++)t.push(e[n].x),t.push(e[n].y)}class Jy extends At{constructor(e=new $l([new ye(.5,.5),new ye(-.5,.5),new ye(-.5,-.5),new ye(.5,-.5)]),n={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:n},e=Array.isArray(e)?e:[e];const i=this,r=[],s=[];for(let o=0,c=e.length;o<c;o++){const u=e[o];a(u)}this.setAttribute("position",new Ye(r,3)),this.setAttribute("uv",new Ye(s,2)),this.computeVertexNormals();function a(o){const c=[],u=n.curveSegments!==void 0?n.curveSegments:12,f=n.steps!==void 0?n.steps:1,p=n.depth!==void 0?n.depth:1;let m=n.bevelEnabled!==void 0?n.bevelEnabled:!0,g=n.bevelThickness!==void 0?n.bevelThickness:.2,y=n.bevelSize!==void 0?n.bevelSize:g-.1,b=n.bevelOffset!==void 0?n.bevelOffset:0,w=n.bevelSegments!==void 0?n.bevelSegments:3;const x=n.extrudePath,_=n.UVGenerator!==void 0?n.UVGenerator:TJ;let S,M=!1,E,C,N,D;x&&(S=x.getSpacedPoints(f),M=!0,m=!1,E=x.computeFrenetFrames(f,!1),C=new H,N=new H,D=new H),m||(w=0,g=0,y=0,b=0);const R=o.extractPoints(u);let k=R.shape;const V=R.holes;if(!qs.isClockWise(k)){k=k.reverse();for(let q=0,_e=V.length;q<_e;q++){const fe=V[q];qs.isClockWise(fe)&&(V[q]=fe.reverse())}}const ie=qs.triangulateShape(k,V),z=k;for(let q=0,_e=V.length;q<_e;q++){const fe=V[q];k=k.concat(fe)}function $(q,_e,fe){return _e||console.error("THREE.ExtrudeGeometry: vec does not exist"),q.clone().addScaledVector(_e,fe)}const X=k.length,ee=ie.length;function L(q,_e,fe){let Te,he,Qe;const De=q.x-_e.x,O=q.y-_e.y,F=fe.x-q.x,ne=fe.y-q.y,Se=De*De+O*O,ve=De*ne-O*F;if(Math.abs(ve)>Number.EPSILON){const we=Math.sqrt(Se),$e=Math.sqrt(F*F+ne*ne),Pe=_e.x-O/we,je=_e.y+De/we,st=fe.x-ne/$e,gt=fe.y+F/$e,be=((st-Pe)*ne-(gt-je)*F)/(De*ne-O*F);Te=Pe+De*be-q.x,he=je+O*be-q.y;const Dt=Te*Te+he*he;if(Dt<=2)return new ye(Te,he);Qe=Math.sqrt(Dt/2)}else{let we=!1;De>Number.EPSILON?F>Number.EPSILON&&(we=!0):De<-Number.EPSILON?F<-Number.EPSILON&&(we=!0):Math.sign(O)===Math.sign(ne)&&(we=!0),we?(Te=-O,he=De,Qe=Math.sqrt(Se)):(Te=De,he=O,Qe=Math.sqrt(Se/2))}return new ye(Te/Qe,he/Qe)}const j=[];for(let q=0,_e=z.length,fe=_e-1,Te=q+1;q<_e;q++,fe++,Te++)fe===_e&&(fe=0),Te===_e&&(Te=0),j[q]=L(z[q],z[fe],z[Te]);const B=[];let Y,Z=j.concat();for(let q=0,_e=V.length;q<_e;q++){const fe=V[q];Y=[];for(let Te=0,he=fe.length,Qe=he-1,De=Te+1;Te<he;Te++,Qe++,De++)Qe===he&&(Qe=0),De===he&&(De=0),Y[Te]=L(fe[Te],fe[Qe],fe[De]);B.push(Y),Z=Z.concat(Y)}for(let q=0;q<w;q++){const _e=q/w,fe=g*Math.cos(_e*Math.PI/2),Te=y*Math.sin(_e*Math.PI/2)+b;for(let he=0,Qe=z.length;he<Qe;he++){const De=$(z[he],j[he],Te);xe(De.x,De.y,-fe)}for(let he=0,Qe=V.length;he<Qe;he++){const De=V[he];Y=B[he];for(let O=0,F=De.length;O<F;O++){const ne=$(De[O],Y[O],Te);xe(ne.x,ne.y,-fe)}}}const K=y+b;for(let q=0;q<X;q++){const _e=m?$(k[q],Z[q],K):k[q];M?(N.copy(E.normals[0]).multiplyScalar(_e.x),C.copy(E.binormals[0]).multiplyScalar(_e.y),D.copy(S[0]).add(N).add(C),xe(D.x,D.y,D.z)):xe(_e.x,_e.y,0)}for(let q=1;q<=f;q++)for(let _e=0;_e<X;_e++){const fe=m?$(k[_e],Z[_e],K):k[_e];M?(N.copy(E.normals[q]).multiplyScalar(fe.x),C.copy(E.binormals[q]).multiplyScalar(fe.y),D.copy(S[q]).add(N).add(C),xe(D.x,D.y,D.z)):xe(fe.x,fe.y,p/f*q)}for(let q=w-1;q>=0;q--){const _e=q/w,fe=g*Math.cos(_e*Math.PI/2),Te=y*Math.sin(_e*Math.PI/2)+b;for(let he=0,Qe=z.length;he<Qe;he++){const De=$(z[he],j[he],Te);xe(De.x,De.y,p+fe)}for(let he=0,Qe=V.length;he<Qe;he++){const De=V[he];Y=B[he];for(let O=0,F=De.length;O<F;O++){const ne=$(De[O],Y[O],Te);M?xe(ne.x,ne.y+S[f-1].y,S[f-1].x+fe):xe(ne.x,ne.y,p+fe)}}}se(),ge();function se(){const q=r.length/3;if(m){let _e=0,fe=X*_e;for(let Te=0;Te<ee;Te++){const he=ie[Te];nt(he[2]+fe,he[1]+fe,he[0]+fe)}_e=f+w*2,fe=X*_e;for(let Te=0;Te<ee;Te++){const he=ie[Te];nt(he[0]+fe,he[1]+fe,he[2]+fe)}}else{for(let _e=0;_e<ee;_e++){const fe=ie[_e];nt(fe[2],fe[1],fe[0])}for(let _e=0;_e<ee;_e++){const fe=ie[_e];nt(fe[0]+X*f,fe[1]+X*f,fe[2]+X*f)}}i.addGroup(q,r.length/3-q,0)}function ge(){const q=r.length/3;let _e=0;Ce(z,_e),_e+=z.length;for(let fe=0,Te=V.length;fe<Te;fe++){const he=V[fe];Ce(he,_e),_e+=he.length}i.addGroup(q,r.length/3-q,1)}function Ce(q,_e){let fe=q.length;for(;--fe>=0;){const Te=fe;let he=fe-1;he<0&&(he=q.length-1);for(let Qe=0,De=f+w*2;Qe<De;Qe++){const O=X*Qe,F=X*(Qe+1),ne=_e+Te+O,Se=_e+he+O,ve=_e+he+F,we=_e+Te+F;it(ne,Se,ve,we)}}}function xe(q,_e,fe){c.push(q),c.push(_e),c.push(fe)}function nt(q,_e,fe){ze(q),ze(_e),ze(fe);const Te=r.length/3,he=_.generateTopUV(i,r,Te-3,Te-2,Te-1);Xe(he[0]),Xe(he[1]),Xe(he[2])}function it(q,_e,fe,Te){ze(q),ze(_e),ze(Te),ze(_e),ze(fe),ze(Te);const he=r.length/3,Qe=_.generateSideWallUV(i,r,he-6,he-3,he-2,he-1);Xe(Qe[0]),Xe(Qe[1]),Xe(Qe[3]),Xe(Qe[1]),Xe(Qe[2]),Xe(Qe[3])}function ze(q){r.push(c[q*3+0]),r.push(c[q*3+1]),r.push(c[q*3+2])}function Xe(q){s.push(q.x),s.push(q.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes,i=this.parameters.options;return EJ(n,i,e)}static fromJSON(e,n){const i=[];for(let s=0,a=e.shapes.length;s<a;s++){const o=n[e.shapes[s]];i.push(o)}const r=e.options.extrudePath;return r!==void 0&&(e.options.extrudePath=new Xx[r.type]().fromJSON(r)),new Jy(i,e.options)}}const TJ={generateTopUV:function(t,e,n,i,r){const s=e[n*3],a=e[n*3+1],o=e[i*3],c=e[i*3+1],u=e[r*3],f=e[r*3+1];return[new ye(s,a),new ye(o,c),new ye(u,f)]},generateSideWallUV:function(t,e,n,i,r,s){const a=e[n*3],o=e[n*3+1],c=e[n*3+2],u=e[i*3],f=e[i*3+1],p=e[i*3+2],m=e[r*3],g=e[r*3+1],y=e[r*3+2],b=e[s*3],w=e[s*3+1],x=e[s*3+2];return Math.abs(o-f)<Math.abs(a-u)?[new ye(a,1-c),new ye(u,1-p),new ye(m,1-y),new ye(b,1-x)]:[new ye(o,1-c),new ye(f,1-p),new ye(g,1-y),new ye(w,1-x)]}};function EJ(t,e,n){if(n.shapes=[],Array.isArray(t))for(let i=0,r=t.length;i<r;i++){const s=t[i];n.shapes.push(s.uuid)}else n.shapes.push(t.uuid);return n.options=Object.assign({},e),e.extrudePath!==void 0&&(n.options.extrudePath=e.extrudePath.toJSON()),n}class ev extends Ko{constructor(e=1,n=0){const i=(1+Math.sqrt(5))/2,r=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],s=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(r,s,e,n),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new ev(e.radius,e.detail)}}class dp extends Ko{constructor(e=1,n=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],r=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,r,e,n),this.type="OctahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new dp(e.radius,e.detail)}}class tv extends At{constructor(e=.5,n=1,i=32,r=1,s=0,a=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:n,thetaSegments:i,phiSegments:r,thetaStart:s,thetaLength:a},i=Math.max(3,i),r=Math.max(1,r);const o=[],c=[],u=[],f=[];let p=e;const m=(n-e)/r,g=new H,y=new ye;for(let b=0;b<=r;b++){for(let w=0;w<=i;w++){const x=s+w/i*a;g.x=p*Math.cos(x),g.y=p*Math.sin(x),c.push(g.x,g.y,g.z),u.push(0,0,1),y.x=(g.x/n+1)/2,y.y=(g.y/n+1)/2,f.push(y.x,y.y)}p+=m}for(let b=0;b<r;b++){const w=b*(i+1);for(let x=0;x<i;x++){const _=x+w,S=_,M=_+i+1,E=_+i+2,C=_+1;o.push(S,M,C),o.push(M,E,C)}}this.setIndex(o),this.setAttribute("position",new Ye(c,3)),this.setAttribute("normal",new Ye(u,3)),this.setAttribute("uv",new Ye(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new tv(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class nv extends At{constructor(e=new $l([new ye(0,.5),new ye(-.5,-.5),new ye(.5,-.5)]),n=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:n};const i=[],r=[],s=[],a=[];let o=0,c=0;if(Array.isArray(e)===!1)u(e);else for(let f=0;f<e.length;f++)u(e[f]),this.addGroup(o,c,f),o+=c,c=0;this.setIndex(i),this.setAttribute("position",new Ye(r,3)),this.setAttribute("normal",new Ye(s,3)),this.setAttribute("uv",new Ye(a,2));function u(f){const p=r.length/3,m=f.extractPoints(n);let g=m.shape;const y=m.holes;qs.isClockWise(g)===!1&&(g=g.reverse());for(let w=0,x=y.length;w<x;w++){const _=y[w];qs.isClockWise(_)===!0&&(y[w]=_.reverse())}const b=qs.triangulateShape(g,y);for(let w=0,x=y.length;w<x;w++){const _=y[w];g=g.concat(_)}for(let w=0,x=g.length;w<x;w++){const _=g[w];r.push(_.x,_.y,0),s.push(0,0,1),a.push(_.x,_.y)}for(let w=0,x=b.length;w<x;w++){const _=b[w],S=_[0]+p,M=_[1]+p,E=_[2]+p;i.push(S,M,E),c+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),n=this.parameters.shapes;return CJ(n,e)}static fromJSON(e,n){const i=[];for(let r=0,s=e.shapes.length;r<s;r++){const a=n[e.shapes[r]];i.push(a)}return new nv(i,e.curveSegments)}}function CJ(t,e){if(e.shapes=[],Array.isArray(t))for(let n=0,i=t.length;n<i;n++){const r=t[n];e.shapes.push(r.uuid)}else e.shapes.push(t.uuid);return e}class hp extends At{constructor(e=1,n=32,i=16,r=0,s=Math.PI*2,a=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:n,heightSegments:i,phiStart:r,phiLength:s,thetaStart:a,thetaLength:o},n=Math.max(3,Math.floor(n)),i=Math.max(2,Math.floor(i));const c=Math.min(a+o,Math.PI);let u=0;const f=[],p=new H,m=new H,g=[],y=[],b=[],w=[];for(let x=0;x<=i;x++){const _=[],S=x/i;let M=0;x===0&&a===0?M=.5/n:x===i&&c===Math.PI&&(M=-.5/n);for(let E=0;E<=n;E++){const C=E/n;p.x=-e*Math.cos(r+C*s)*Math.sin(a+S*o),p.y=e*Math.cos(a+S*o),p.z=e*Math.sin(r+C*s)*Math.sin(a+S*o),y.push(p.x,p.y,p.z),m.copy(p).normalize(),b.push(m.x,m.y,m.z),w.push(C+M,1-S),_.push(u++)}f.push(_)}for(let x=0;x<i;x++)for(let _=0;_<n;_++){const S=f[x][_+1],M=f[x][_],E=f[x+1][_],C=f[x+1][_+1];(x!==0||a>0)&&g.push(S,M,C),(x!==i-1||c<Math.PI)&&g.push(M,E,C)}this.setIndex(g),this.setAttribute("position",new Ye(y,3)),this.setAttribute("normal",new Ye(b,3)),this.setAttribute("uv",new Ye(w,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new hp(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class iv extends Ko{constructor(e=1,n=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],r=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,r,e,n),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:n}}static fromJSON(e){return new iv(e.radius,e.detail)}}class rv extends At{constructor(e=1,n=.4,i=12,r=48,s=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:n,radialSegments:i,tubularSegments:r,arc:s},i=Math.floor(i),r=Math.floor(r);const a=[],o=[],c=[],u=[],f=new H,p=new H,m=new H;for(let g=0;g<=i;g++)for(let y=0;y<=r;y++){const b=y/r*s,w=g/i*Math.PI*2;p.x=(e+n*Math.cos(w))*Math.cos(b),p.y=(e+n*Math.cos(w))*Math.sin(b),p.z=n*Math.sin(w),o.push(p.x,p.y,p.z),f.x=e*Math.cos(b),f.y=e*Math.sin(b),m.subVectors(p,f).normalize(),c.push(m.x,m.y,m.z),u.push(y/r),u.push(g/i)}for(let g=1;g<=i;g++)for(let y=1;y<=r;y++){const b=(r+1)*g+y-1,w=(r+1)*(g-1)+y-1,x=(r+1)*(g-1)+y,_=(r+1)*g+y;a.push(b,w,_),a.push(w,x,_)}this.setIndex(a),this.setAttribute("position",new Ye(o,3)),this.setAttribute("normal",new Ye(c,3)),this.setAttribute("uv",new Ye(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new rv(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class sv extends At{constructor(e=1,n=.4,i=64,r=8,s=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:n,tubularSegments:i,radialSegments:r,p:s,q:a},i=Math.floor(i),r=Math.floor(r);const o=[],c=[],u=[],f=[],p=new H,m=new H,g=new H,y=new H,b=new H,w=new H,x=new H;for(let S=0;S<=i;++S){const M=S/i*s*Math.PI*2;_(M,s,a,e,g),_(M+.01,s,a,e,y),w.subVectors(y,g),x.addVectors(y,g),b.crossVectors(w,x),x.crossVectors(b,w),b.normalize(),x.normalize();for(let E=0;E<=r;++E){const C=E/r*Math.PI*2,N=-n*Math.cos(C),D=n*Math.sin(C);p.x=g.x+(N*x.x+D*b.x),p.y=g.y+(N*x.y+D*b.y),p.z=g.z+(N*x.z+D*b.z),c.push(p.x,p.y,p.z),m.subVectors(p,g).normalize(),u.push(m.x,m.y,m.z),f.push(S/i),f.push(E/r)}}for(let S=1;S<=i;S++)for(let M=1;M<=r;M++){const E=(r+1)*(S-1)+(M-1),C=(r+1)*S+(M-1),N=(r+1)*S+M,D=(r+1)*(S-1)+M;o.push(E,C,D),o.push(C,N,D)}this.setIndex(o),this.setAttribute("position",new Ye(c,3)),this.setAttribute("normal",new Ye(u,3)),this.setAttribute("uv",new Ye(f,2));function _(S,M,E,C,N){const D=Math.cos(S),R=Math.sin(S),k=E/M*S,V=Math.cos(k);N.x=C*(2+V)*.5*D,N.y=C*(2+V)*R*.5,N.z=C*Math.sin(k)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new sv(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class av extends At{constructor(e=new rM(new H(-1,-1,0),new H(-1,1,0),new H(1,1,0)),n=64,i=1,r=8,s=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:n,radius:i,radialSegments:r,closed:s};const a=e.computeFrenetFrames(n,s);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const o=new H,c=new H,u=new ye;let f=new H;const p=[],m=[],g=[],y=[];b(),this.setIndex(y),this.setAttribute("position",new Ye(p,3)),this.setAttribute("normal",new Ye(m,3)),this.setAttribute("uv",new Ye(g,2));function b(){for(let S=0;S<n;S++)w(S);w(s===!1?n:0),_(),x()}function w(S){f=e.getPointAt(S/n,f);const M=a.normals[S],E=a.binormals[S];for(let C=0;C<=r;C++){const N=C/r*Math.PI*2,D=Math.sin(N),R=-Math.cos(N);c.x=R*M.x+D*E.x,c.y=R*M.y+D*E.y,c.z=R*M.z+D*E.z,c.normalize(),m.push(c.x,c.y,c.z),o.x=f.x+i*c.x,o.y=f.y+i*c.y,o.z=f.z+i*c.z,p.push(o.x,o.y,o.z)}}function x(){for(let S=1;S<=n;S++)for(let M=1;M<=r;M++){const E=(r+1)*(S-1)+(M-1),C=(r+1)*S+(M-1),N=(r+1)*S+M,D=(r+1)*(S-1)+M;y.push(E,C,D),y.push(C,N,D)}}function _(){for(let S=0;S<=n;S++)for(let M=0;M<=r;M++)u.x=S/n,u.y=M/r,g.push(u.x,u.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new av(new Xx[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Dj extends At{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const n=[],i=new Set,r=new H,s=new H;if(e.index!==null){const a=e.attributes.position,o=e.index;let c=e.groups;c.length===0&&(c=[{start:0,count:o.count,materialIndex:0}]);for(let u=0,f=c.length;u<f;++u){const p=c[u],m=p.start,g=p.count;for(let y=m,b=m+g;y<b;y+=3)for(let w=0;w<3;w++){const x=o.getX(y+w),_=o.getX(y+(w+1)%3);r.fromBufferAttribute(a,x),s.fromBufferAttribute(a,_),SN(r,s,i)===!0&&(n.push(r.x,r.y,r.z),n.push(s.x,s.y,s.z))}}}else{const a=e.attributes.position;for(let o=0,c=a.count/3;o<c;o++)for(let u=0;u<3;u++){const f=3*o+u,p=3*o+(u+1)%3;r.fromBufferAttribute(a,f),s.fromBufferAttribute(a,p),SN(r,s,i)===!0&&(n.push(r.x,r.y,r.z),n.push(s.x,s.y,s.z))}}this.setAttribute("position",new Ye(n,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function SN(t,e,n){const i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`,r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`;return n.has(i)===!0||n.has(r)===!0?!1:(n.add(i),n.add(r),!0)}var AN=Object.freeze({__proto__:null,BoxGeometry:uc,CapsuleGeometry:$y,CircleGeometry:Yy,ConeGeometry:Qy,CylinderGeometry:bd,DodecahedronGeometry:Ky,EdgesGeometry:Rj,ExtrudeGeometry:Jy,IcosahedronGeometry:ev,LatheGeometry:up,OctahedronGeometry:dp,PlaneGeometry:lp,PolyhedronGeometry:Ko,RingGeometry:tv,ShapeGeometry:nv,SphereGeometry:hp,TetrahedronGeometry:iv,TorusGeometry:rv,TorusKnotGeometry:sv,TubeGeometry:av,WireframeGeometry:Dj});class Fj extends Ii{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Ue(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class jj extends Qs{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class aM extends Ii{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Ue(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ue(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Oj extends aM{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new ye(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Pn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(n){this.ior=(1+.4*n)/(1-.4*n)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Ue(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Ue(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Ue(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Uj extends Ii{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ue(16777215),this.specular=new Ue(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ue(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=np,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class zj extends Ii{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ue(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ue(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class Bj extends Ii{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class Vj extends Ii{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ue(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ue(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=np,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Hj extends Ii{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ue(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Wj extends qi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function kl(t,e,n){return!t||!n&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)}function Gj(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function qj(t){function e(r,s){return t[r]-t[s]}const n=t.length,i=new Array(n);for(let r=0;r!==n;++r)i[r]=r;return i.sort(e),i}function S_(t,e,n){const i=t.length,r=new t.constructor(i);for(let s=0,a=0;a!==i;++s){const o=n[s]*e;for(let c=0;c!==e;++c)r[a++]=t[o+c]}return r}function oM(t,e,n,i){let r=1,s=t[0];for(;s!==void 0&&s[i]===void 0;)s=t[r++];if(s===void 0)return;let a=s[i];if(a!==void 0)if(Array.isArray(a))do a=s[i],a!==void 0&&(e.push(s.time),n.push.apply(n,a)),s=t[r++];while(s!==void 0);else if(a.toArray!==void 0)do a=s[i],a!==void 0&&(e.push(s.time),a.toArray(n,n.length)),s=t[r++];while(s!==void 0);else do a=s[i],a!==void 0&&(e.push(s.time),n.push(a)),s=t[r++];while(s!==void 0)}function PJ(t,e,n,i,r=30){const s=t.clone();s.name=e;const a=[];for(let c=0;c<s.tracks.length;++c){const u=s.tracks[c],f=u.getValueSize(),p=[],m=[];for(let g=0;g<u.times.length;++g){const y=u.times[g]*r;if(!(y<n||y>=i)){p.push(u.times[g]);for(let b=0;b<f;++b)m.push(u.values[g*f+b])}}p.length!==0&&(u.times=kl(p,u.times.constructor),u.values=kl(m,u.values.constructor),a.push(u))}s.tracks=a;let o=1/0;for(let c=0;c<s.tracks.length;++c)o>s.tracks[c].times[0]&&(o=s.tracks[c].times[0]);for(let c=0;c<s.tracks.length;++c)s.tracks[c].shift(-1*o);return s.resetDuration(),s}function NJ(t,e=0,n=t,i=30){i<=0&&(i=30);const r=n.tracks.length,s=e/i;for(let a=0;a<r;++a){const o=n.tracks[a],c=o.ValueTypeName;if(c==="bool"||c==="string")continue;const u=t.tracks.find(function(x){return x.name===o.name&&x.ValueTypeName===c});if(u===void 0)continue;let f=0;const p=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=p/3);let m=0;const g=u.getValueSize();u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(m=g/3);const y=o.times.length-1;let b;if(s<=o.times[0]){const x=f,_=p-f;b=o.values.slice(x,_)}else if(s>=o.times[y]){const x=y*p+f,_=x+p-f;b=o.values.slice(x,_)}else{const x=o.createInterpolant(),_=f,S=p-f;x.evaluate(s),b=x.resultBuffer.slice(_,S)}c==="quaternion"&&new ar().fromArray(b).normalize().conjugate().toArray(b);const w=u.times.length;for(let x=0;x<w;++x){const _=x*g+m;if(c==="quaternion")ar.multiplyQuaternionsFlat(u.values,_,b,0,u.values,_);else{const S=g-m*2;for(let M=0;M<S;++M)u.values[_+M]-=b[M]}}}return t.blendMode=jA,t}const RJ={convertArray:kl,isTypedArray:Gj,getKeyframeOrder:qj,sortedArray:S_,flattenJSON:oM,subclip:PJ,makeClipAdditive:NJ};class fp{constructor(e,n,i,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=r!==void 0?r:new n.constructor(i),this.sampleValues=n,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(e){const n=this.parameterPositions;let i=this._cachedIndex,r=n[i],s=n[i-1];e:{t:{let a;n:{i:if(!(e<r)){for(let o=i+2;;){if(r===void 0){if(e<s)break i;return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===o)break;if(s=r,r=n[++i],e<r)break t}a=n.length;break n}if(!(e>=s)){const o=n[1];e<o&&(i=2,s=o);for(let c=i-2;;){if(s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===c)break;if(r=s,s=n[--i-1],e>=s)break t}a=i,i=0;break n}break e}for(;i<a;){const o=i+a>>>1;e<n[o]?a=o:i=o+1}if(r=n[i],s=n[i-1],s===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(r===void 0)return i=n.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,s,r)}return this.interpolate_(i,s,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const n=this.resultBuffer,i=this.sampleValues,r=this.valueSize,s=e*r;for(let a=0;a!==r;++a)n[a]=i[s+a];return n}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class Xj extends fp{constructor(e,n,i,r){super(e,n,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Nl,endingEnd:Nl}}intervalChanged_(e,n,i){const r=this.parameterPositions;let s=e-2,a=e+1,o=r[s],c=r[a];if(o===void 0)switch(this.getSettings_().endingStart){case Rl:s=e,o=2*n-i;break;case Mf:s=r.length-2,o=n+r[s]-r[s+1];break;default:s=e,o=i}if(c===void 0)switch(this.getSettings_().endingEnd){case Rl:a=e,c=2*i-n;break;case Mf:a=1,c=i+r[1]-r[0];break;default:a=e-1,c=n}const u=(i-n)*.5,f=this.valueSize;this._weightPrev=u/(n-o),this._weightNext=u/(c-i),this._offsetPrev=s*f,this._offsetNext=a*f}interpolate_(e,n,i,r){const s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,u=c-o,f=this._offsetPrev,p=this._offsetNext,m=this._weightPrev,g=this._weightNext,y=(i-n)/(r-n),b=y*y,w=b*y,x=-m*w+2*m*b-m*y,_=(1+m)*w+(-1.5-2*m)*b+(-.5+m)*y+1,S=(-1-g)*w+(1.5+g)*b+.5*y,M=g*w-g*b;for(let E=0;E!==o;++E)s[E]=x*a[f+E]+_*a[u+E]+S*a[c+E]+M*a[p+E];return s}}class lM extends fp{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e,n,i,r){const s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=e*o,u=c-o,f=(i-n)/(r-n),p=1-f;for(let m=0;m!==o;++m)s[m]=a[u+m]*p+a[c+m]*f;return s}}class $j extends fp{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class ws{constructor(e,n,i,r){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(n===void 0||n.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=kl(n,this.TimeBufferType),this.values=kl(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const n=e.constructor;let i;if(n.toJSON!==this.toJSON)i=n.toJSON(e);else{i={name:e.name,times:kl(e.times,Array),values:kl(e.values,Array)};const r=e.getInterpolation();r!==e.DefaultInterpolation&&(i.interpolation=r)}return i.type=e.ValueTypeName,i}InterpolantFactoryMethodDiscrete(e){return new $j(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new lM(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new Xj(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let n;switch(e){case Sf:n=this.InterpolantFactoryMethodDiscrete;break;case Af:n=this.InterpolantFactoryMethodLinear;break;case tx:n=this.InterpolantFactoryMethodSmooth;break}if(n===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=n,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Sf;case this.InterpolantFactoryMethodLinear:return Af;case this.InterpolantFactoryMethodSmooth:return tx}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]+=e}return this}scale(e){if(e!==1){const n=this.times;for(let i=0,r=n.length;i!==r;++i)n[i]*=e}return this}trim(e,n){const i=this.times,r=i.length;let s=0,a=r-1;for(;s!==r&&i[s]<e;)++s;for(;a!==-1&&i[a]>n;)--a;if(++a,s!==0||a!==r){s>=a&&(a=Math.max(a,1),s=a-1);const o=this.getValueSize();this.times=i.slice(s,a),this.values=this.values.slice(s*o,a*o)}return this}validate(){let e=!0;const n=this.getValueSize();n-Math.floor(n)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==s;o++){const c=i[o];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,c),e=!1;break}if(a!==null&&a>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,c,a),e=!1;break}a=c}if(r!==void 0&&Gj(r))for(let o=0,c=r.length;o!==c;++o){const u=r[o];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),n=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===tx,s=e.length-1;let a=1;for(let o=1;o<s;++o){let c=!1;const u=e[o],f=e[o+1];if(u!==f&&(o!==1||u!==e[0]))if(r)c=!0;else{const p=o*i,m=p-i,g=p+i;for(let y=0;y!==i;++y){const b=n[p+y];if(b!==n[m+y]||b!==n[g+y]){c=!0;break}}}if(c){if(o!==a){e[a]=e[o];const p=o*i,m=a*i;for(let g=0;g!==i;++g)n[m+g]=n[p+g]}++a}}if(s>0){e[a]=e[s];for(let o=s*i,c=a*i,u=0;u!==i;++u)n[c+u]=n[o+u];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=n.slice(0,a*i)):(this.times=e,this.values=n),this}clone(){const e=this.times.slice(),n=this.values.slice(),i=this.constructor,r=new i(this.name,e,n);return r.createInterpolant=this.createInterpolant,r}}ws.prototype.TimeBufferType=Float32Array;ws.prototype.ValueBufferType=Float32Array;ws.prototype.DefaultInterpolation=Af;class dc extends ws{}dc.prototype.ValueTypeName="bool";dc.prototype.ValueBufferType=Array;dc.prototype.DefaultInterpolation=Sf;dc.prototype.InterpolantFactoryMethodLinear=void 0;dc.prototype.InterpolantFactoryMethodSmooth=void 0;class cM extends ws{}cM.prototype.ValueTypeName="color";class Df extends ws{}Df.prototype.ValueTypeName="number";class Yj extends fp{constructor(e,n,i,r){super(e,n,i,r)}interpolate_(e,n,i,r){const s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,c=(i-n)/(r-n);let u=e*o;for(let f=u+o;u!==f;u+=4)ar.slerpFlat(s,0,a,u-o,a,u,c);return s}}class _d extends ws{InterpolantFactoryMethodLinear(e){return new Yj(this.times,this.values,this.getValueSize(),e)}}_d.prototype.ValueTypeName="quaternion";_d.prototype.DefaultInterpolation=Af;_d.prototype.InterpolantFactoryMethodSmooth=void 0;class hc extends ws{}hc.prototype.ValueTypeName="string";hc.prototype.ValueBufferType=Array;hc.prototype.DefaultInterpolation=Sf;hc.prototype.InterpolantFactoryMethodLinear=void 0;hc.prototype.InterpolantFactoryMethodSmooth=void 0;class Ff extends ws{}Ff.prototype.ValueTypeName="vector";class jf{constructor(e,n=-1,i,r=Oy){this.name=e,this.tracks=i,this.duration=n,this.blendMode=r,this.uuid=_r(),this.duration<0&&this.resetDuration()}static parse(e){const n=[],i=e.tracks,r=1/(e.fps||1);for(let a=0,o=i.length;a!==o;++a)n.push(kJ(i[a]).scale(r));const s=new this(e.name,e.duration,n,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const n=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:n,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,a=i.length;s!==a;++s)n.push(ws.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,n,i,r){const s=n.length,a=[];for(let o=0;o<s;o++){let c=[],u=[];c.push((o+s-1)%s,o,(o+1)%s),u.push(0,1,0);const f=qj(c);c=S_(c,1,f),u=S_(u,1,f),!r&&c[0]===0&&(c.push(s),u.push(u[0])),a.push(new Df(".morphTargetInfluences["+n[o].name+"]",c,u).scale(1/i))}return new this(e,-1,a)}static findByName(e,n){let i=e;if(!Array.isArray(e)){const r=e;i=r.geometry&&r.geometry.animations||r.animations}for(let r=0;r<i.length;r++)if(i[r].name===n)return i[r];return null}static CreateClipsFromMorphTargetSequences(e,n,i){const r={},s=/^([\w-]*?)([\d]+)$/;for(let o=0,c=e.length;o<c;o++){const u=e[o],f=u.name.match(s);if(f&&f.length>1){const p=f[1];let m=r[p];m||(r[p]=m=[]),m.push(u)}}const a=[];for(const o in r)a.push(this.CreateFromMorphTargetSequence(o,r[o],n,i));return a}static parseAnimation(e,n){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(p,m,g,y,b){if(g.length!==0){const w=[],x=[];oM(g,w,x,y),w.length!==0&&b.push(new p(m,w,x))}},r=[],s=e.name||"default",a=e.fps||30,o=e.blendMode;let c=e.length||-1;const u=e.hierarchy||[];for(let p=0;p<u.length;p++){const m=u[p].keys;if(!(!m||m.length===0))if(m[0].morphTargets){const g={};let y;for(y=0;y<m.length;y++)if(m[y].morphTargets)for(let b=0;b<m[y].morphTargets.length;b++)g[m[y].morphTargets[b]]=-1;for(const b in g){const w=[],x=[];for(let _=0;_!==m[y].morphTargets.length;++_){const S=m[y];w.push(S.time),x.push(S.morphTarget===b?1:0)}r.push(new Df(".morphTargetInfluence["+b+"]",w,x))}c=g.length*a}else{const g=".bones["+n[p].name+"]";i(Ff,g+".position",m,"pos",r),i(_d,g+".quaternion",m,"rot",r),i(Ff,g+".scale",m,"scl",r)}}return r.length===0?null:new this(s,c,r,o)}resetDuration(){const e=this.tracks;let n=0;for(let i=0,r=e.length;i!==r;++i){const s=this.tracks[i];n=Math.max(n,s.times[s.times.length-1])}return this.duration=n,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let n=0;n<this.tracks.length;n++)e=e&&this.tracks[n].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function IJ(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Df;case"vector":case"vector2":case"vector3":case"vector4":return Ff;case"color":return cM;case"quaternion":return _d;case"bool":case"boolean":return dc;case"string":return hc}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}function kJ(t){if(t.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=IJ(t.type);if(t.times===void 0){const n=[],i=[];oM(t.keys,n,i,"value"),t.times=n,t.values=i}return e.parse!==void 0?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)}const ba={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class uM{constructor(e,n,i){const r=this;let s=!1,a=0,o=0,c;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=n,this.onError=i,this.itemStart=function(f){o++,s===!1&&r.onStart!==void 0&&r.onStart(f,a,o),s=!0},this.itemEnd=function(f){a++,r.onProgress!==void 0&&r.onProgress(f,a,o),a===o&&(s=!1,r.onLoad!==void 0&&r.onLoad())},this.itemError=function(f){r.onError!==void 0&&r.onError(f)},this.resolveURL=function(f){return c?c(f):f},this.setURLModifier=function(f){return c=f,this},this.addHandler=function(f,p){return u.push(f,p),this},this.removeHandler=function(f){const p=u.indexOf(f);return p!==-1&&u.splice(p,2),this},this.getHandler=function(f){for(let p=0,m=u.length;p<m;p+=2){const g=u[p],y=u[p+1];if(g.global&&(g.lastIndex=0),g.test(f))return y}return null}}}const Qj=new uM;class or{constructor(e){this.manager=e!==void 0?e:Qj,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,n){const i=this;return new Promise(function(r,s){i.load(e,r,n,s)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}or.DEFAULT_MATERIAL_NAME="__DEFAULT";const da={};class LJ extends Error{constructor(e,n){super(e),this.response=n}}class Da extends or{constructor(e){super(e)}load(e,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=ba.get(e);if(s!==void 0)return this.manager.itemStart(e),setTimeout(()=>{n&&n(s),this.manager.itemEnd(e)},0),s;if(da[e]!==void 0){da[e].push({onLoad:n,onProgress:i,onError:r});return}da[e]=[],da[e].push({onLoad:n,onProgress:i,onError:r});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,c=this.responseType;fetch(a).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const f=da[e],p=u.body.getReader(),m=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),g=m?parseInt(m):0,y=g!==0;let b=0;const w=new ReadableStream({start(x){_();function _(){p.read().then(({done:S,value:M})=>{if(S)x.close();else{b+=M.byteLength;const E=new ProgressEvent("progress",{lengthComputable:y,loaded:b,total:g});for(let C=0,N=f.length;C<N;C++){const D=f[C];D.onProgress&&D.onProgress(E)}x.enqueue(M),_()}})}}});return new Response(w)}else throw new LJ(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(c){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(f=>new DOMParser().parseFromString(f,o));case"json":return u.json();default:if(o===void 0)return u.text();{const p=/charset="?([^;"\s]*)"?/i.exec(o),m=p&&p[1]?p[1].toLowerCase():void 0,g=new TextDecoder(m);return u.arrayBuffer().then(y=>g.decode(y))}}}).then(u=>{ba.add(e,u);const f=da[e];delete da[e];for(let p=0,m=f.length;p<m;p++){const g=f[p];g.onLoad&&g.onLoad(u)}}).catch(u=>{const f=da[e];if(f===void 0)throw this.manager.itemError(e),u;delete da[e];for(let p=0,m=f.length;p<m;p++){const g=f[p];g.onError&&g.onError(u)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class DJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=this,a=new Da(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(o){try{n(s.parse(JSON.parse(o)))}catch(c){r?r(c):console.error(c),s.manager.itemError(e)}},i,r)}parse(e){const n=[];for(let i=0;i<e.length;i++){const r=jf.parse(e[i]);n.push(r)}return n}}class FJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=this,a=[],o=new qy,c=new Da(this.manager);c.setPath(this.path),c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setWithCredentials(s.withCredentials);let u=0;function f(p){c.load(e[p],function(m){const g=s.parse(m,!0);a[p]={width:g.width,height:g.height,format:g.format,mipmaps:g.mipmaps},u+=1,u===6&&(g.mipmapCount===1&&(o.minFilter=jn),o.image=a,o.format=g.format,o.needsUpdate=!0,n&&n(o))},i,r)}if(Array.isArray(e))for(let p=0,m=e.length;p<m;++p)f(p);else c.load(e,function(p){const m=s.parse(p,!0);if(m.isCubemap){const g=m.mipmaps.length/m.mipmapCount;for(let y=0;y<g;y++){a[y]={mipmaps:[]};for(let b=0;b<m.mipmapCount;b++)a[y].mipmaps.push(m.mipmaps[y*m.mipmapCount+b]),a[y].format=m.format,a[y].width=m.width,a[y].height=m.height}o.image=a}else o.image.width=m.width,o.image.height=m.height,o.mipmaps=m.mipmaps;m.mipmapCount===1&&(o.minFilter=jn),o.format=m.format,o.needsUpdate=!0,n&&n(o)},i,r);return o}}class Of extends or{constructor(e){super(e)}load(e,n,i,r){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,a=ba.get(e);if(a!==void 0)return s.manager.itemStart(e),setTimeout(function(){n&&n(a),s.manager.itemEnd(e)},0),a;const o=Nf("img");function c(){f(),ba.add(e,this),n&&n(this),s.manager.itemEnd(e)}function u(p){f(),r&&r(p),s.manager.itemError(e),s.manager.itemEnd(e)}function f(){o.removeEventListener("load",c,!1),o.removeEventListener("error",u,!1)}return o.addEventListener("load",c,!1),o.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),s.manager.itemStart(e),o.src=e,o}}class jJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=new ap;s.colorSpace=qn;const a=new Of(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let o=0;function c(u){a.load(e[u],function(f){s.images[u]=f,o++,o===6&&(s.needsUpdate=!0,n&&n(s))},void 0,r)}for(let u=0;u<e.length;++u)c(u);return s}}class OJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=this,a=new Xl,o=new Da(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(s.withCredentials),o.load(e,function(c){let u;try{u=s.parse(c)}catch(f){if(r!==void 0)r(f);else{console.error(f);return}}u.image!==void 0?a.image=u.image:u.data!==void 0&&(a.image.width=u.width,a.image.height=u.height,a.image.data=u.data),a.wrapS=u.wrapS!==void 0?u.wrapS:Ci,a.wrapT=u.wrapT!==void 0?u.wrapT:Ci,a.magFilter=u.magFilter!==void 0?u.magFilter:jn,a.minFilter=u.minFilter!==void 0?u.minFilter:jn,a.anisotropy=u.anisotropy!==void 0?u.anisotropy:1,u.colorSpace!==void 0?a.colorSpace=u.colorSpace:u.encoding!==void 0&&(a.encoding=u.encoding),u.flipY!==void 0&&(a.flipY=u.flipY),u.format!==void 0&&(a.format=u.format),u.type!==void 0&&(a.type=u.type),u.mipmaps!==void 0&&(a.mipmaps=u.mipmaps,a.minFilter=Bo),u.mipmapCount===1&&(a.minFilter=jn),u.generateMipmaps!==void 0&&(a.generateMipmaps=u.generateMipmaps),a.needsUpdate=!0,n&&n(a,u)},i,r),a}}class UJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=new Un,a=new Of(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(o){s.image=o,s.needsUpdate=!0,n!==void 0&&n(s)},i,r),s}}class Zo extends Gt{constructor(e,n=1){super(),this.isLight=!0,this.type="Light",this.color=new Ue(e),this.intensity=n}dispose(){}copy(e,n){return super.copy(e,n),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const n=super.toJSON(e);return n.object.color=this.color.getHex(),n.object.intensity=this.intensity,this.groundColor!==void 0&&(n.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(n.object.distance=this.distance),this.angle!==void 0&&(n.object.angle=this.angle),this.decay!==void 0&&(n.object.decay=this.decay),this.penumbra!==void 0&&(n.object.penumbra=this.penumbra),this.shadow!==void 0&&(n.object.shadow=this.shadow.toJSON()),n}}class Kj extends Zo{constructor(e,n,i){super(e,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Gt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Ue(n)}copy(e,n){return super.copy(e,n),this.groundColor.copy(e.groundColor),this}}const Xw=new pt,MN=new H,TN=new H;class dM{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new ye(512,512),this.map=null,this.mapPass=null,this.matrix=new pt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new op,this._frameExtents=new ye(1,1),this._viewportCount=1,this._viewports=[new Yt(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const n=this.camera,i=this.matrix;MN.setFromMatrixPosition(e.matrixWorld),n.position.copy(MN),TN.setFromMatrixPosition(e.target.matrixWorld),n.lookAt(TN),n.updateMatrixWorld(),Xw.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Xw),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Xw)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class zJ extends dM{constructor(){super(new si(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const n=this.camera,i=id*2*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,s=e.distance||n.far;(i!==n.fov||r!==n.aspect||s!==n.far)&&(n.fov=i,n.aspect=r,n.far=s,n.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class Zj extends Zo{constructor(e,n,i=0,r=Math.PI/3,s=0,a=2){super(e,n),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Gt.DEFAULT_UP),this.updateMatrix(),this.target=new Gt,this.distance=i,this.angle=r,this.penumbra=s,this.decay=a,this.map=null,this.shadow=new zJ}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const EN=new pt,uh=new H,$w=new H;class BJ extends dM{constructor(){super(new si(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new ye(4,2),this._viewportCount=6,this._viewports=[new Yt(2,1,1,1),new Yt(0,1,1,1),new Yt(3,1,1,1),new Yt(1,1,1,1),new Yt(3,0,1,1),new Yt(1,0,1,1)],this._cubeDirections=[new H(1,0,0),new H(-1,0,0),new H(0,0,1),new H(0,0,-1),new H(0,1,0),new H(0,-1,0)],this._cubeUps=[new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,1,0),new H(0,0,1),new H(0,0,-1)]}updateMatrices(e,n=0){const i=this.camera,r=this.matrix,s=e.distance||i.far;s!==i.far&&(i.far=s,i.updateProjectionMatrix()),uh.setFromMatrixPosition(e.matrixWorld),i.position.copy(uh),$w.copy(i.position),$w.add(this._cubeDirections[n]),i.up.copy(this._cubeUps[n]),i.lookAt($w),i.updateMatrixWorld(),r.makeTranslation(-uh.x,-uh.y,-uh.z),EN.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(EN)}}class Jj extends Zo{constructor(e,n,i=0,r=2){super(e,n),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new BJ}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,n){return super.copy(e,n),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class VJ extends dM{constructor(){super(new cp(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class eO extends Zo{constructor(e,n){super(e,n),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Gt.DEFAULT_UP),this.updateMatrix(),this.target=new Gt,this.shadow=new VJ}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class tO extends Zo{constructor(e,n){super(e,n),this.isAmbientLight=!0,this.type="AmbientLight"}}class nO extends Zo{constructor(e,n,i=10,r=10){super(e,n),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const n=super.toJSON(e);return n.object.width=this.width,n.object.height=this.height,n}}class iO{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new H)}set(e){for(let n=0;n<9;n++)this.coefficients[n].copy(e[n]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,n){const i=e.x,r=e.y,s=e.z,a=this.coefficients;return n.copy(a[0]).multiplyScalar(.282095),n.addScaledVector(a[1],.488603*r),n.addScaledVector(a[2],.488603*s),n.addScaledVector(a[3],.488603*i),n.addScaledVector(a[4],1.092548*(i*r)),n.addScaledVector(a[5],1.092548*(r*s)),n.addScaledVector(a[6],.315392*(3*s*s-1)),n.addScaledVector(a[7],1.092548*(i*s)),n.addScaledVector(a[8],.546274*(i*i-r*r)),n}getIrradianceAt(e,n){const i=e.x,r=e.y,s=e.z,a=this.coefficients;return n.copy(a[0]).multiplyScalar(.886227),n.addScaledVector(a[1],2*.511664*r),n.addScaledVector(a[2],2*.511664*s),n.addScaledVector(a[3],2*.511664*i),n.addScaledVector(a[4],2*.429043*i*r),n.addScaledVector(a[5],2*.429043*r*s),n.addScaledVector(a[6],.743125*s*s-.247708),n.addScaledVector(a[7],2*.429043*i*s),n.addScaledVector(a[8],.429043*(i*i-r*r)),n}add(e){for(let n=0;n<9;n++)this.coefficients[n].add(e.coefficients[n]);return this}addScaledSH(e,n){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(e.coefficients[i],n);return this}scale(e){for(let n=0;n<9;n++)this.coefficients[n].multiplyScalar(e);return this}lerp(e,n){for(let i=0;i<9;i++)this.coefficients[i].lerp(e.coefficients[i],n);return this}equals(e){for(let n=0;n<9;n++)if(!this.coefficients[n].equals(e.coefficients[n]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,n=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].fromArray(e,n+r*3);return this}toArray(e=[],n=0){const i=this.coefficients;for(let r=0;r<9;r++)i[r].toArray(e,n+r*3);return e}static getBasisAt(e,n){const i=e.x,r=e.y,s=e.z;n[0]=.282095,n[1]=.488603*r,n[2]=.488603*s,n[3]=.488603*i,n[4]=1.092548*i*r,n[5]=1.092548*r*s,n[6]=.315392*(3*s*s-1),n[7]=1.092548*i*s,n[8]=.546274*(i*i-r*r)}}class rO extends Zo{constructor(e=new iO,n=1){super(void 0,n),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const n=super.toJSON(e);return n.object.sh=this.sh.toArray(),n}}class ov extends or{constructor(e){super(e),this.textures={}}load(e,n,i,r){const s=this,a=new Da(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,function(o){try{n(s.parse(JSON.parse(o)))}catch(c){r?r(c):console.error(c),s.manager.itemError(e)}},i,r)}parse(e){const n=this.textures;function i(s){return n[s]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",s),n[s]}const r=ov.createMaterialFromType(e.type);if(e.uuid!==void 0&&(r.uuid=e.uuid),e.name!==void 0&&(r.name=e.name),e.color!==void 0&&r.color!==void 0&&r.color.setHex(e.color),e.roughness!==void 0&&(r.roughness=e.roughness),e.metalness!==void 0&&(r.metalness=e.metalness),e.sheen!==void 0&&(r.sheen=e.sheen),e.sheenColor!==void 0&&(r.sheenColor=new Ue().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(r.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&r.emissive!==void 0&&r.emissive.setHex(e.emissive),e.specular!==void 0&&r.specular!==void 0&&r.specular.setHex(e.specular),e.specularIntensity!==void 0&&(r.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&r.specularColor!==void 0&&r.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(r.shininess=e.shininess),e.clearcoat!==void 0&&(r.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(r.clearcoatRoughness=e.clearcoatRoughness),e.iridescence!==void 0&&(r.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(r.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(r.transmission=e.transmission),e.thickness!==void 0&&(r.thickness=e.thickness),e.attenuationDistance!==void 0&&(r.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&r.attenuationColor!==void 0&&r.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(r.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(r.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(r.fog=e.fog),e.flatShading!==void 0&&(r.flatShading=e.flatShading),e.blending!==void 0&&(r.blending=e.blending),e.combine!==void 0&&(r.combine=e.combine),e.side!==void 0&&(r.side=e.side),e.shadowSide!==void 0&&(r.shadowSide=e.shadowSide),e.opacity!==void 0&&(r.opacity=e.opacity),e.transparent!==void 0&&(r.transparent=e.transparent),e.alphaTest!==void 0&&(r.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(r.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(r.depthFunc=e.depthFunc),e.depthTest!==void 0&&(r.depthTest=e.depthTest),e.depthWrite!==void 0&&(r.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(r.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(r.blendSrc=e.blendSrc),e.blendDst!==void 0&&(r.blendDst=e.blendDst),e.blendEquation!==void 0&&(r.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(r.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(r.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(r.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&r.blendColor!==void 0&&r.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(r.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(r.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(r.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(r.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(r.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(r.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(r.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(r.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(r.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(r.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(r.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(r.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(r.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(r.rotation=e.rotation),e.linewidth!==void 0&&(r.linewidth=e.linewidth),e.dashSize!==void 0&&(r.dashSize=e.dashSize),e.gapSize!==void 0&&(r.gapSize=e.gapSize),e.scale!==void 0&&(r.scale=e.scale),e.polygonOffset!==void 0&&(r.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(r.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(r.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(r.dithering=e.dithering),e.alphaToCoverage!==void 0&&(r.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(r.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(r.forceSinglePass=e.forceSinglePass),e.visible!==void 0&&(r.visible=e.visible),e.toneMapped!==void 0&&(r.toneMapped=e.toneMapped),e.userData!==void 0&&(r.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const a=e.uniforms[s];switch(r.uniforms[s]={},a.type){case"t":r.uniforms[s].value=i(a.value);break;case"c":r.uniforms[s].value=new Ue().setHex(a.value);break;case"v2":r.uniforms[s].value=new ye().fromArray(a.value);break;case"v3":r.uniforms[s].value=new H().fromArray(a.value);break;case"v4":r.uniforms[s].value=new Yt().fromArray(a.value);break;case"m3":r.uniforms[s].value=new Pt().fromArray(a.value);break;case"m4":r.uniforms[s].value=new pt().fromArray(a.value);break;default:r.uniforms[s].value=a.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new ye().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new ye().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const n={ShadowMaterial:Fj,SpriteMaterial:KA,RawShaderMaterial:jj,ShaderMaterial:Qs,PointsMaterial:JA,MeshPhysicalMaterial:Oj,MeshStandardMaterial:aM,MeshPhongMaterial:Uj,MeshToonMaterial:zj,MeshNormalMaterial:Bj,MeshLambertMaterial:Vj,MeshDepthMaterial:XA,MeshDistanceMaterial:$A,MeshBasicMaterial:Qo,MeshMatcapMaterial:Hj,LineDashedMaterial:Wj,LineBasicMaterial:qi,Material:Ii};return new n[e]}}class A_{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let n="";for(let i=0,r=e.length;i<r;i++)n+=String.fromCharCode(e[i]);try{return decodeURIComponent(escape(n))}catch{return n}}static extractUrlBase(e){const n=e.lastIndexOf("/");return n===-1?"./":e.slice(0,n+1)}static resolveURL(e,n){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(n)&&/^\//.test(e)&&(n=n.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:n+e)}}class sO extends At{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class aO extends or{constructor(e){super(e)}load(e,n,i,r){const s=this,a=new Da(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,function(o){try{n(s.parse(JSON.parse(o)))}catch(c){r?r(c):console.error(c),s.manager.itemError(e)}},i,r)}parse(e){const n={},i={};function r(g,y){if(n[y]!==void 0)return n[y];const w=g.interleavedBuffers[y],x=s(g,w.buffer),_=wu(w.type,x),S=new Wy(_,w.stride);return S.uuid=w.uuid,n[y]=S,S}function s(g,y){if(i[y]!==void 0)return i[y];const w=g.arrayBuffers[y],x=new Uint32Array(w).buffer;return i[y]=x,x}const a=e.isInstancedBufferGeometry?new sO:new At,o=e.data.index;if(o!==void 0){const g=wu(o.type,o.array);a.setIndex(new qt(g,1))}const c=e.data.attributes;for(const g in c){const y=c[g];let b;if(y.isInterleavedBufferAttribute){const w=r(e.data,y.data);b=new sc(w,y.itemSize,y.offset,y.normalized)}else{const w=wu(y.type,y.array),x=y.isInstancedBufferAttribute?sd:qt;b=new x(w,y.itemSize,y.normalized)}y.name!==void 0&&(b.name=y.name),y.usage!==void 0&&b.setUsage(y.usage),a.setAttribute(g,b)}const u=e.data.morphAttributes;if(u)for(const g in u){const y=u[g],b=[];for(let w=0,x=y.length;w<x;w++){const _=y[w];let S;if(_.isInterleavedBufferAttribute){const M=r(e.data,_.data);S=new sc(M,_.itemSize,_.offset,_.normalized)}else{const M=wu(_.type,_.array);S=new qt(M,_.itemSize,_.normalized)}_.name!==void 0&&(S.name=_.name),b.push(S)}a.morphAttributes[g]=b}e.data.morphTargetsRelative&&(a.morphTargetsRelative=!0);const p=e.data.groups||e.data.drawcalls||e.data.offsets;if(p!==void 0)for(let g=0,y=p.length;g!==y;++g){const b=p[g];a.addGroup(b.start,b.count,b.materialIndex)}const m=e.data.boundingSphere;if(m!==void 0){const g=new H;m.center!==void 0&&g.fromArray(m.center),a.boundingSphere=new Ni(g,m.radius)}return e.name&&(a.name=e.name),e.userData&&(a.userData=e.userData),a}}class HJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=this,a=this.path===""?A_.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;const o=new Da(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(c){let u=null;try{u=JSON.parse(c)}catch(p){r!==void 0&&r(p),console.error("THREE:ObjectLoader: Can't parse "+e+".",p.message);return}const f=u.metadata;if(f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry"){r!==void 0&&r(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}s.parse(u,n)},i,r)}async loadAsync(e,n){const i=this,r=this.path===""?A_.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||r;const s=new Da(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials);const a=await s.loadAsync(e,n),o=JSON.parse(a),c=o.metadata;if(c===void 0||c.type===void 0||c.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await i.parseAsync(o)}parse(e,n){const i=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),s=this.parseGeometries(e.geometries,r),a=this.parseImages(e.images,function(){n!==void 0&&n(u)}),o=this.parseTextures(e.textures,a),c=this.parseMaterials(e.materials,o),u=this.parseObject(e.object,s,c,o,i),f=this.parseSkeletons(e.skeletons,u);if(this.bindSkeletons(u,f),n!==void 0){let p=!1;for(const m in a)if(a[m].data instanceof HTMLImageElement){p=!0;break}p===!1&&n(u)}return u}async parseAsync(e){const n=this.parseAnimations(e.animations),i=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,i),s=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,s),o=this.parseMaterials(e.materials,a),c=this.parseObject(e.object,r,o,a,n),u=this.parseSkeletons(e.skeletons,c);return this.bindSkeletons(c,u),c}parseShapes(e){const n={};if(e!==void 0)for(let i=0,r=e.length;i<r;i++){const s=new $l().fromJSON(e[i]);n[s.uuid]=s}return n}parseSkeletons(e,n){const i={},r={};if(n.traverse(function(s){s.isBone&&(r[s.uuid]=s)}),e!==void 0)for(let s=0,a=e.length;s<a;s++){const o=new Gy().fromJSON(e[s],r);i[o.uuid]=o}return i}parseGeometries(e,n){const i={};if(e!==void 0){const r=new aO;for(let s=0,a=e.length;s<a;s++){let o;const c=e[s];switch(c.type){case"BufferGeometry":case"InstancedBufferGeometry":o=r.parse(c);break;default:c.type in AN?o=AN[c.type].fromJSON(c,n):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${c.type}"`)}o.uuid=c.uuid,c.name!==void 0&&(o.name=c.name),c.userData!==void 0&&(o.userData=c.userData),i[c.uuid]=o}}return i}parseMaterials(e,n){const i={},r={};if(e!==void 0){const s=new ov;s.setTextures(n);for(let a=0,o=e.length;a<o;a++){const c=e[a];i[c.uuid]===void 0&&(i[c.uuid]=s.parse(c)),r[c.uuid]=i[c.uuid]}}return r}parseAnimations(e){const n={};if(e!==void 0)for(let i=0;i<e.length;i++){const r=e[i],s=jf.parse(r);n[s.uuid]=s}return n}parseImages(e,n){const i=this,r={};let s;function a(c){return i.manager.itemStart(c),s.load(c,function(){i.manager.itemEnd(c)},void 0,function(){i.manager.itemError(c),i.manager.itemEnd(c)})}function o(c){if(typeof c=="string"){const u=c,f=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:i.resourcePath+u;return a(f)}else return c.data?{data:wu(c.type,c.data),width:c.width,height:c.height}:null}if(e!==void 0&&e.length>0){const c=new uM(n);s=new Of(c),s.setCrossOrigin(this.crossOrigin);for(let u=0,f=e.length;u<f;u++){const p=e[u],m=p.url;if(Array.isArray(m)){const g=[];for(let y=0,b=m.length;y<b;y++){const w=m[y],x=o(w);x!==null&&(x instanceof HTMLImageElement?g.push(x):g.push(new Xl(x.data,x.width,x.height)))}r[p.uuid]=new Il(g)}else{const g=o(p.url);r[p.uuid]=new Il(g)}}}return r}async parseImagesAsync(e){const n=this,i={};let r;async function s(a){if(typeof a=="string"){const o=a,c=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(o)?o:n.resourcePath+o;return await r.loadAsync(c)}else return a.data?{data:wu(a.type,a.data),width:a.width,height:a.height}:null}if(e!==void 0&&e.length>0){r=new Of(this.manager),r.setCrossOrigin(this.crossOrigin);for(let a=0,o=e.length;a<o;a++){const c=e[a],u=c.url;if(Array.isArray(u)){const f=[];for(let p=0,m=u.length;p<m;p++){const g=u[p],y=await s(g);y!==null&&(y instanceof HTMLImageElement?f.push(y):f.push(new Xl(y.data,y.width,y.height)))}i[c.uuid]=new Il(f)}else{const f=await s(c.url);i[c.uuid]=new Il(f)}}}return i}parseTextures(e,n){function i(s,a){return typeof s=="number"?s:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",s),a[s])}const r={};if(e!==void 0)for(let s=0,a=e.length;s<a;s++){const o=e[s];o.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),n[o.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",o.image);const c=n[o.image],u=c.data;let f;Array.isArray(u)?(f=new ap,u.length===6&&(f.needsUpdate=!0)):(u&&u.data?f=new Xl:f=new Un,u&&(f.needsUpdate=!0)),f.source=c,f.uuid=o.uuid,o.name!==void 0&&(f.name=o.name),o.mapping!==void 0&&(f.mapping=i(o.mapping,WJ)),o.channel!==void 0&&(f.channel=o.channel),o.offset!==void 0&&f.offset.fromArray(o.offset),o.repeat!==void 0&&f.repeat.fromArray(o.repeat),o.center!==void 0&&f.center.fromArray(o.center),o.rotation!==void 0&&(f.rotation=o.rotation),o.wrap!==void 0&&(f.wrapS=i(o.wrap[0],CN),f.wrapT=i(o.wrap[1],CN)),o.format!==void 0&&(f.format=o.format),o.internalFormat!==void 0&&(f.internalFormat=o.internalFormat),o.type!==void 0&&(f.type=o.type),o.colorSpace!==void 0&&(f.colorSpace=o.colorSpace),o.encoding!==void 0&&(f.encoding=o.encoding),o.minFilter!==void 0&&(f.minFilter=i(o.minFilter,PN)),o.magFilter!==void 0&&(f.magFilter=i(o.magFilter,PN)),o.anisotropy!==void 0&&(f.anisotropy=o.anisotropy),o.flipY!==void 0&&(f.flipY=o.flipY),o.generateMipmaps!==void 0&&(f.generateMipmaps=o.generateMipmaps),o.premultiplyAlpha!==void 0&&(f.premultiplyAlpha=o.premultiplyAlpha),o.unpackAlignment!==void 0&&(f.unpackAlignment=o.unpackAlignment),o.compareFunction!==void 0&&(f.compareFunction=o.compareFunction),o.userData!==void 0&&(f.userData=o.userData),r[o.uuid]=f}return r}parseObject(e,n,i,r,s){let a;function o(m){return n[m]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",m),n[m]}function c(m){if(m!==void 0){if(Array.isArray(m)){const g=[];for(let y=0,b=m.length;y<b;y++){const w=m[y];i[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",w),g.push(i[w])}return g}return i[m]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",m),i[m]}}function u(m){return r[m]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",m),r[m]}let f,p;switch(e.type){case"Scene":a=new QA,e.background!==void 0&&(Number.isInteger(e.background)?a.background=new Ue(e.background):a.background=u(e.background)),e.environment!==void 0&&(a.environment=u(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?a.fog=new Hy(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(a.fog=new Vy(e.fog.color,e.fog.density)),e.fog.name!==""&&(a.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(a.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(a.backgroundIntensity=e.backgroundIntensity);break;case"PerspectiveCamera":a=new si(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(a.focus=e.focus),e.zoom!==void 0&&(a.zoom=e.zoom),e.filmGauge!==void 0&&(a.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(a.filmOffset=e.filmOffset),e.view!==void 0&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new cp(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(a.zoom=e.zoom),e.view!==void 0&&(a.view=Object.assign({},e.view));break;case"AmbientLight":a=new tO(e.color,e.intensity);break;case"DirectionalLight":a=new eO(e.color,e.intensity);break;case"PointLight":a=new Jj(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new nO(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new Zj(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new Kj(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=new rO().fromJSON(e);break;case"SkinnedMesh":f=o(e.geometry),p=c(e.material),a=new bj(f,p),e.bindMode!==void 0&&(a.bindMode=e.bindMode),e.bindMatrix!==void 0&&a.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(a.skeleton=e.skeleton);break;case"Mesh":f=o(e.geometry),p=c(e.material),a=new $n(f,p);break;case"InstancedMesh":f=o(e.geometry),p=c(e.material);const m=e.count,g=e.instanceMatrix,y=e.instanceColor;a=new _j(f,p,m),a.instanceMatrix=new sd(new Float32Array(g.array),16),y!==void 0&&(a.instanceColor=new sd(new Float32Array(y.array),y.itemSize));break;case"BatchedMesh":f=o(e.geometry),p=c(e.material),a=new Sj(e.maxGeometryCount,e.maxVertexCount,e.maxIndexCount,p),a.geometry=f,a.perObjectFrustumCulled=e.perObjectFrustumCulled,a.sortObjects=e.sortObjects,a._drawRanges=e.drawRanges,a._reservedRanges=e.reservedRanges,a._visibility=e.visibility,a._active=e.active,a._bounds=e.bounds.map(b=>{const w=new Hi;w.min.fromArray(b.boxMin),w.max.fromArray(b.boxMax);const x=new Ni;return x.radius=b.sphereRadius,x.center.fromArray(b.sphereCenter),{boxInitialized:b.boxInitialized,box:w,sphereInitialized:b.sphereInitialized,sphere:x}}),a._maxGeometryCount=e.maxGeometryCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._geometryCount=e.geometryCount,a._matricesTexture=u(e.matricesTexture.uuid);break;case"LOD":a=new wj;break;case"Line":a=new Vo(o(e.geometry),c(e.material));break;case"LineLoop":a=new Aj(o(e.geometry),c(e.material));break;case"LineSegments":a=new Zs(o(e.geometry),c(e.material));break;case"PointCloud":case"Points":a=new Mj(o(e.geometry),c(e.material));break;case"Sprite":a=new vj(c(e.material));break;case"Group":a=new Su;break;case"Bone":a=new ZA;break;default:a=new Gt}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix!==void 0?(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){const m=e.children;for(let g=0;g<m.length;g++)a.add(this.parseObject(m[g],n,i,r,s))}if(e.animations!==void 0){const m=e.animations;for(let g=0;g<m.length;g++){const y=m[g];a.animations.push(s[y])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(a.autoUpdate=e.autoUpdate);const m=e.levels;for(let g=0;g<m.length;g++){const y=m[g],b=a.getObjectByProperty("uuid",y.object);b!==void 0&&a.addLevel(b,y.distance,y.hysteresis)}}return a}bindSkeletons(e,n){Object.keys(n).length!==0&&e.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const r=n[i.skeleton];r===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(r,i.bindMatrix)}})}}const WJ={UVMapping:Fy,CubeReflectionMapping:La,CubeRefractionMapping:zo,EquirectangularReflectionMapping:vf,EquirectangularRefractionMapping:wf,CubeUVReflectionMapping:yd},CN={RepeatWrapping:bf,ClampToEdgeWrapping:Ci,MirroredRepeatWrapping:_f},PN={NearestFilter:Ln,NearestMipmapNearestFilter:Wx,NearestMipmapLinearFilter:Fh,LinearFilter:jn,LinearMipmapNearestFilter:PA,LinearMipmapLinearFilter:Bo};class GJ extends or{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,n,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,a=ba.get(e);if(a!==void 0){if(s.manager.itemStart(e),a.then){a.then(u=>{n&&n(u),s.manager.itemEnd(e)}).catch(u=>{r&&r(u)});return}return setTimeout(function(){n&&n(a),s.manager.itemEnd(e)},0),a}const o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader;const c=fetch(e,o).then(function(u){return u.blob()}).then(function(u){return createImageBitmap(u,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(u){return ba.add(e,u),n&&n(u),s.manager.itemEnd(e),u}).catch(function(u){r&&r(u),ba.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});ba.add(e,c),s.manager.itemStart(e)}}let _g;class hM{static getContext(){return _g===void 0&&(_g=new(window.AudioContext||window.webkitAudioContext)),_g}static setContext(e){_g=e}}class qJ extends or{constructor(e){super(e)}load(e,n,i,r){const s=this,a=new Da(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(c){try{const u=c.slice(0);hM.getContext().decodeAudioData(u,function(p){n(p)}).catch(o)}catch(u){o(u)}},i,r);function o(c){r?r(c):console.error(c),s.manager.itemError(e)}}}const NN=new pt,RN=new pt,pl=new pt;class XJ{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new si,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new si,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const n=this._cache;if(n.focus!==e.focus||n.fov!==e.fov||n.aspect!==e.aspect*this.aspect||n.near!==e.near||n.far!==e.far||n.zoom!==e.zoom||n.eyeSep!==this.eyeSep){n.focus=e.focus,n.fov=e.fov,n.aspect=e.aspect*this.aspect,n.near=e.near,n.far=e.far,n.zoom=e.zoom,n.eyeSep=this.eyeSep,pl.copy(e.projectionMatrix);const r=n.eyeSep/2,s=r*n.near/n.focus,a=n.near*Math.tan(Gl*n.fov*.5)/n.zoom;let o,c;RN.elements[12]=-r,NN.elements[12]=r,o=-a*n.aspect+s,c=a*n.aspect+s,pl.elements[0]=2*n.near/(c-o),pl.elements[8]=(c+o)/(c-o),this.cameraL.projectionMatrix.copy(pl),o=-a*n.aspect-s,c=a*n.aspect-s,pl.elements[0]=2*n.near/(c-o),pl.elements[8]=(c+o)/(c-o),this.cameraR.projectionMatrix.copy(pl)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(RN),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(NN)}}class fM{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=IN(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const n=IN();e=(n-this.oldTime)/1e3,this.oldTime=n,this.elapsedTime+=e}return e}}function IN(){return(typeof performance>"u"?Date:performance).now()}const ml=new H,kN=new ar,$J=new H,gl=new H;class YJ extends Gt{constructor(){super(),this.type="AudioListener",this.context=hM.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new fM}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const n=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(ml,kN,$J),gl.set(0,0,-1).applyQuaternion(kN),n.positionX){const r=this.context.currentTime+this.timeDelta;n.positionX.linearRampToValueAtTime(ml.x,r),n.positionY.linearRampToValueAtTime(ml.y,r),n.positionZ.linearRampToValueAtTime(ml.z,r),n.forwardX.linearRampToValueAtTime(gl.x,r),n.forwardY.linearRampToValueAtTime(gl.y,r),n.forwardZ.linearRampToValueAtTime(gl.z,r),n.upX.linearRampToValueAtTime(i.x,r),n.upY.linearRampToValueAtTime(i.y,r),n.upZ.linearRampToValueAtTime(i.z,r)}else n.setPosition(ml.x,ml.y,ml.z),n.setOrientation(gl.x,gl.y,gl.z,i.x,i.y,i.z)}}class oO extends Gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const n=this.context.createBufferSource();return n.buffer=this.buffer,n.loop=this.loop,n.loopStart=this.loopStart,n.loopEnd=this.loopEnd,n.onended=this.onEnded.bind(this),n.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=n,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,n=this.filters.length;e<n;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,n=this.filters.length;e<n;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=e,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const xl=new H,LN=new ar,QJ=new H,yl=new H;class KJ extends oO{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,n,i){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=n,this.panner.coneOuterGain=i,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(xl,LN,QJ),yl.set(0,0,1).applyQuaternion(LN);const n=this.panner;if(n.positionX){const i=this.context.currentTime+this.listener.timeDelta;n.positionX.linearRampToValueAtTime(xl.x,i),n.positionY.linearRampToValueAtTime(xl.y,i),n.positionZ.linearRampToValueAtTime(xl.z,i),n.orientationX.linearRampToValueAtTime(yl.x,i),n.orientationY.linearRampToValueAtTime(yl.y,i),n.orientationZ.linearRampToValueAtTime(yl.z,i)}else n.setPosition(xl.x,xl.y,xl.z),n.setOrientation(yl.x,yl.y,yl.z)}}class ZJ{constructor(e,n=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=n,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const n=this.getFrequencyData();for(let i=0;i<n.length;i++)e+=n[i];return e/n.length}}class lO{constructor(e,n,i){this.binding=e,this.valueSize=i;let r,s,a;switch(n){case"quaternion":r=this._slerp,s=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":r=this._select,s=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:r=this._lerp,s=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*5)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=s,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,n){const i=this.buffer,r=this.valueSize,s=e*r+r;let a=this.cumulativeWeight;if(a===0){for(let o=0;o!==r;++o)i[s+o]=i[o];a=n}else{a+=n;const o=n/a;this._mixBufferRegion(i,s,0,o,r)}this.cumulativeWeight=a}accumulateAdditive(e){const n=this.buffer,i=this.valueSize,r=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(n,r,0,e,i),this.cumulativeWeightAdditive+=e}apply(e){const n=this.valueSize,i=this.buffer,r=e*n+n,s=this.cumulativeWeight,a=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,s<1){const c=n*this._origIndex;this._mixBufferRegion(i,r,c,1-s,n)}a>0&&this._mixBufferRegionAdditive(i,r,this._addIndex*n,1,n);for(let c=n,u=n+n;c!==u;++c)if(i[c]!==i[c+n]){o.setValue(i,r);break}}saveOriginalState(){const e=this.binding,n=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(n,r);for(let s=i,a=r;s!==a;++s)n[s]=n[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,n=e+this.valueSize;for(let i=e;i<n;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,n=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[n+i]=this.buffer[e+i]}_select(e,n,i,r,s){if(r>=.5)for(let a=0;a!==s;++a)e[n+a]=e[i+a]}_slerp(e,n,i,r){ar.slerpFlat(e,n,e,n,e,i,r)}_slerpAdditive(e,n,i,r,s){const a=this._workIndex*s;ar.multiplyQuaternionsFlat(e,a,e,n,e,i),ar.slerpFlat(e,n,e,n,e,a,r)}_lerp(e,n,i,r,s){const a=1-r;for(let o=0;o!==s;++o){const c=n+o;e[c]=e[c]*a+e[i+o]*r}}_lerpAdditive(e,n,i,r,s){for(let a=0;a!==s;++a){const o=n+a;e[o]=e[o]+e[i+a]*r}}}const pM="\\[\\]\\.:\\/",JJ=new RegExp("["+pM+"]","g"),mM="[^"+pM+"]",eee="[^"+pM.replace("\\.","")+"]",tee=/((?:WC+[\/:])*)/.source.replace("WC",mM),nee=/(WCOD+)?/.source.replace("WCOD",eee),iee=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",mM),ree=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",mM),see=new RegExp("^"+tee+nee+iee+ree+"$"),aee=["material","materials","bones","map"];class oee{constructor(e,n,i){const r=i||Ut.parseTrackName(n);this._targetGroup=e,this._bindings=e.subscribe_(n,r)}getValue(e,n){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,n)}setValue(e,n){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,n)}bind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].bind()}unbind(){const e=this._bindings;for(let n=this._targetGroup.nCachedObjects_,i=e.length;n!==i;++n)e[n].unbind()}}class Ut{constructor(e,n,i){this.path=n,this.parsedPath=i||Ut.parseTrackName(n),this.node=Ut.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,i){return e&&e.isAnimationObjectGroup?new Ut.Composite(e,n,i):new Ut(e,n,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(JJ,"")}static parseTrackName(e){const n=see.exec(e);if(n===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);aee.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,n){if(n===void 0||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(n);if(i!==void 0)return i}if(e.children){const i=function(s){for(let a=0;a<s.length;a++){const o=s[a];if(o.name===n||o.uuid===n)return o;const c=i(o.children);if(c)return c}return null},r=i(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,n){e[n]=this.targetObject[this.propertyName]}_getValue_array(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)e[n++]=i[r]}_getValue_arrayElement(e,n){e[n]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,n){this.resolvedProperty.toArray(e,n)}_setValue_direct(e,n){this.targetObject[this.propertyName]=e[n]}_setValue_direct_setNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,n){this.targetObject[this.propertyName]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++]}_setValue_array_setNeedsUpdate(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,n){const i=this.resolvedProperty;for(let r=0,s=i.length;r!==s;++r)i[r]=e[n++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,n){this.resolvedProperty[this.propertyIndex]=e[n]}_setValue_arrayElement_setNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty[this.propertyIndex]=e[n],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,n){this.resolvedProperty.fromArray(e,n)}_setValue_fromArray_setNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,n){this.resolvedProperty.fromArray(e,n),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,n){this.bind(),this.getValue(e,n)}_setValue_unbound(e,n){this.bind(),this.setValue(e,n)}bind(){let e=this.node;const n=this.parsedPath,i=n.objectName,r=n.propertyName;let s=n.propertyIndex;if(e||(e=Ut.findNode(this.rootNode,n.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let u=n.objectIndex;switch(i){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let f=0;f<e.length;f++)if(e[f].name===u){u=f;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[i]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const a=e[r];if(a===void 0){const u=n.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+r+" but it wasn't found.",e);return}let o=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?o=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(o=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(s!==void 0){if(r==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[s]!==void 0&&(s=e.morphTargetDictionary[s])}c=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=s}else a.fromArray!==void 0&&a.toArray!==void 0?(c=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(c=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ut.Composite=oee;Ut.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Ut.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Ut.prototype.GetterByBindingType=[Ut.prototype._getValue_direct,Ut.prototype._getValue_array,Ut.prototype._getValue_arrayElement,Ut.prototype._getValue_toArray];Ut.prototype.SetterByBindingTypeAndVersioning=[[Ut.prototype._setValue_direct,Ut.prototype._setValue_direct_setNeedsUpdate,Ut.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_array,Ut.prototype._setValue_array_setNeedsUpdate,Ut.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_arrayElement,Ut.prototype._setValue_arrayElement_setNeedsUpdate,Ut.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ut.prototype._setValue_fromArray,Ut.prototype._setValue_fromArray_setNeedsUpdate,Ut.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class lee{constructor(){this.isAnimationObjectGroup=!0,this.uuid=_r(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let i=0,r=arguments.length;i!==r;++i)e[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}add(){const e=this._objects,n=this._indicesByUUID,i=this._paths,r=this._parsedPaths,s=this._bindings,a=s.length;let o,c=e.length,u=this.nCachedObjects_;for(let f=0,p=arguments.length;f!==p;++f){const m=arguments[f],g=m.uuid;let y=n[g];if(y===void 0){y=c++,n[g]=y,e.push(m);for(let b=0,w=a;b!==w;++b)s[b].push(new Ut(m,i[b],r[b]))}else if(y<u){o=e[y];const b=--u,w=e[b];n[w.uuid]=y,e[y]=w,n[g]=b,e[b]=m;for(let x=0,_=a;x!==_;++x){const S=s[x],M=S[b];let E=S[y];S[y]=M,E===void 0&&(E=new Ut(m,i[x],r[x])),S[b]=E}}else e[y]!==o&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=u}remove(){const e=this._objects,n=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_;for(let a=0,o=arguments.length;a!==o;++a){const c=arguments[a],u=c.uuid,f=n[u];if(f!==void 0&&f>=s){const p=s++,m=e[p];n[m.uuid]=f,e[f]=m,n[u]=p,e[p]=c;for(let g=0,y=r;g!==y;++g){const b=i[g],w=b[p],x=b[f];b[f]=w,b[p]=x}}}this.nCachedObjects_=s}uncache(){const e=this._objects,n=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,a=e.length;for(let o=0,c=arguments.length;o!==c;++o){const u=arguments[o],f=u.uuid,p=n[f];if(p!==void 0)if(delete n[f],p<s){const m=--s,g=e[m],y=--a,b=e[y];n[g.uuid]=p,e[p]=g,n[b.uuid]=m,e[m]=b,e.pop();for(let w=0,x=r;w!==x;++w){const _=i[w],S=_[m],M=_[y];_[p]=S,_[m]=M,_.pop()}}else{const m=--a,g=e[m];m>0&&(n[g.uuid]=p),e[p]=g,e.pop();for(let y=0,b=r;y!==b;++y){const w=i[y];w[p]=w[m],w.pop()}}}this.nCachedObjects_=s}subscribe_(e,n){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const a=this._paths,o=this._parsedPaths,c=this._objects,u=c.length,f=this.nCachedObjects_,p=new Array(u);r=s.length,i[e]=r,a.push(e),o.push(n),s.push(p);for(let m=f,g=c.length;m!==g;++m){const y=c[m];p[m]=new Ut(y,e,n)}return p}unsubscribe_(e){const n=this._bindingsIndicesByPath,i=n[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,a=this._bindings,o=a.length-1,c=a[o],u=e[o];n[u]=i,a[i]=c,a.pop(),s[i]=s[o],s.pop(),r[i]=r[o],r.pop()}}}class cO{constructor(e,n,i=null,r=n.blendMode){this._mixer=e,this._clip=n,this._localRoot=i,this.blendMode=r;const s=n.tracks,a=s.length,o=new Array(a),c={endingStart:Nl,endingEnd:Nl};for(let u=0;u!==a;++u){const f=s[u].createInterpolant(null);o[u]=f,f.settings=c}this._interpolantSettings=c,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=HF,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,n){return this.loop=e,this.repetitions=n,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,n,i){if(e.fadeOut(n),this.fadeIn(n),i){const r=this._clip.duration,s=e._clip.duration,a=s/r,o=r/s;e.warp(1,a,n),this.warp(o,1,n)}return this}crossFadeTo(e,n,i){return e.crossFadeFrom(this,n,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,n,i){const r=this._mixer,s=r.time,a=this.timeScale;let o=this._timeScaleInterpolant;o===null&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);const c=o.parameterPositions,u=o.sampleValues;return c[0]=s,c[1]=s+i,u[0]=e/a,u[1]=n/a,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,n,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const c=(e-s)*i;c<0||i===0?n=0:(this._startTime=null,n=i*c)}n*=this._updateTimeScale(e);const a=this._updateTime(n),o=this._updateWeight(e);if(o>0){const c=this._interpolants,u=this._propertyBindings;switch(this.blendMode){case jA:for(let f=0,p=c.length;f!==p;++f)c[f].evaluate(a),u[f].accumulateAdditive(o);break;case Oy:default:for(let f=0,p=c.length;f!==p;++f)c[f].evaluate(a),u[f].accumulate(r,o)}}}_updateWeight(e){let n=0;if(this.enabled){n=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];n*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=n,n}_updateTimeScale(e){let n=0;if(!this.paused){n=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];n*=r,e>i.parameterPositions[1]&&(this.stopWarping(),n===0?this.paused=!0:this.timeScale=n)}}return this._effectiveTimeScale=n,n}_updateTime(e){const n=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const a=i===WF;if(e===0)return s===-1?r:a&&(s&1)===1?n-r:r;if(i===VF){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=n)r=n;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),r>=n||r<0){const o=Math.floor(r/n);r-=n*o,s+=Math.abs(o);const c=this.repetitions-s;if(c<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?n:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(c===1){const u=e<0;this._setEndings(u,!u,a)}else this._setEndings(!1,!1,a);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=r;if(a&&(s&1)===1)return n-r}return r}_setEndings(e,n,i){const r=this._interpolantSettings;i?(r.endingStart=Rl,r.endingEnd=Rl):(e?r.endingStart=this.zeroSlopeAtStart?Rl:Nl:r.endingStart=Mf,n?r.endingEnd=this.zeroSlopeAtEnd?Rl:Nl:r.endingEnd=Mf)}_scheduleFading(e,n,i){const r=this._mixer,s=r.time;let a=this._weightInterpolant;a===null&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,c=a.sampleValues;return o[0]=s,c[0]=n,o[1]=s+e,c[1]=i,this}}const cee=new Float32Array(1);class uee extends Oa{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,a=e._propertyBindings,o=e._interpolants,c=i.uuid,u=this._bindingsByRootAndName;let f=u[c];f===void 0&&(f={},u[c]=f);for(let p=0;p!==s;++p){const m=r[p],g=m.name;let y=f[g];if(y!==void 0)++y.referenceCount,a[p]=y;else{if(y=a[p],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,c,g));continue}const b=n&&n._propertyBindings[p].binding.parsedPath;y=new lO(Ut.create(i,g,b),m.ValueTypeName,m.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,c,g),a[p]=y}o[p].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const n=e._cacheIndex;return n!==null&&n<this._nActiveActions}_addInactiveAction(e,n,i){const r=this._actions,s=this._actionsByClip;let a=s[n];if(a===void 0)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,s[n]=a;else{const o=a.knownActions;e._byClipCacheIndex=o.length,o.push(e)}e._cacheIndex=r.length,r.push(e),a.actionByRoot[i]=e}_removeInactiveAction(e){const n=this._actions,i=n[n.length-1],r=e._cacheIndex;i._cacheIndex=r,n[r]=i,n.pop(),e._cacheIndex=null;const s=e._clip.uuid,a=this._actionsByClip,o=a[s],c=o.knownActions,u=c[c.length-1],f=e._byClipCacheIndex;u._byClipCacheIndex=f,c[f]=u,c.pop(),e._byClipCacheIndex=null;const p=o.actionByRoot,m=(e._localRoot||this._root).uuid;delete p[m],c.length===0&&delete a[s],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const n=e._propertyBindings;for(let i=0,r=n.length;i!==r;++i){const s=n[i];--s.referenceCount===0&&this._removeInactiveBinding(s)}}_lendAction(e){const n=this._actions,i=e._cacheIndex,r=this._nActiveActions++,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_takeBackAction(e){const n=this._actions,i=e._cacheIndex,r=--this._nActiveActions,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_addInactiveBinding(e,n,i){const r=this._bindingsByRootAndName,s=this._bindings;let a=r[n];a===void 0&&(a={},r[n]=a),a[i]=e,e._cacheIndex=s.length,s.push(e)}_removeInactiveBinding(e){const n=this._bindings,i=e.binding,r=i.rootNode.uuid,s=i.path,a=this._bindingsByRootAndName,o=a[r],c=n[n.length-1],u=e._cacheIndex;c._cacheIndex=u,n[u]=c,n.pop(),delete o[s],Object.keys(o).length===0&&delete a[r]}_lendBinding(e){const n=this._bindings,i=e._cacheIndex,r=this._nActiveBindings++,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_takeBackBinding(e){const n=this._bindings,i=e._cacheIndex,r=--this._nActiveBindings,s=n[r];e._cacheIndex=r,n[r]=e,s._cacheIndex=i,n[i]=s}_lendControlInterpolant(){const e=this._controlInterpolants,n=this._nActiveControlInterpolants++;let i=e[n];return i===void 0&&(i=new lM(new Float32Array(2),new Float32Array(2),1,cee),i.__cacheIndex=n,e[n]=i),i}_takeBackControlInterpolant(e){const n=this._controlInterpolants,i=e.__cacheIndex,r=--this._nActiveControlInterpolants,s=n[r];e.__cacheIndex=r,n[r]=e,s.__cacheIndex=i,n[i]=s}clipAction(e,n,i){const r=n||this._root,s=r.uuid;let a=typeof e=="string"?jf.findByName(r,e):e;const o=a!==null?a.uuid:e,c=this._actionsByClip[o];let u=null;if(i===void 0&&(a!==null?i=a.blendMode:i=Oy),c!==void 0){const p=c.actionByRoot[s];if(p!==void 0&&p.blendMode===i)return p;u=c.knownActions[0],a===null&&(a=u._clip)}if(a===null)return null;const f=new cO(this,a,n,i);return this._bindAction(f,u),this._addInactiveAction(f,o,s),f}existingAction(e,n){const i=n||this._root,r=i.uuid,s=typeof e=="string"?jf.findByName(i,e):e,a=s?s.uuid:e,o=this._actionsByClip[a];return o!==void 0&&o.actionByRoot[r]||null}stopAllAction(){const e=this._actions,n=this._nActiveActions;for(let i=n-1;i>=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const n=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),a=this._accuIndex^=1;for(let u=0;u!==i;++u)n[u]._update(r,e,s,a);const o=this._bindings,c=this._nActiveBindings;for(let u=0;u!==c;++u)o[u].apply(a);return this}setTime(e){this.time=0;for(let n=0;n<this._actions.length;n++)this._actions[n].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const n=this._actions,i=e.uuid,r=this._actionsByClip,s=r[i];if(s!==void 0){const a=s.knownActions;for(let o=0,c=a.length;o!==c;++o){const u=a[o];this._deactivateAction(u);const f=u._cacheIndex,p=n[n.length-1];u._cacheIndex=null,u._byClipCacheIndex=null,p._cacheIndex=f,n[f]=p,n.pop(),this._removeInactiveBindingsForAction(u)}delete r[i]}}uncacheRoot(e){const n=e.uuid,i=this._actionsByClip;for(const a in i){const o=i[a].actionByRoot,c=o[n];c!==void 0&&(this._deactivateAction(c),this._removeInactiveAction(c))}const r=this._bindingsByRootAndName,s=r[n];if(s!==void 0)for(const a in s){const o=s[a];o.restoreOriginalState(),this._removeInactiveBinding(o)}}uncacheAction(e,n){const i=this.existingAction(e,n);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class gM{constructor(e){this.value=e}clone(){return new gM(this.value.clone===void 0?this.value:this.value.clone())}}let dee=0;class hee extends Oa{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:dee++}),this.name="",this.usage=Pf,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const n=this.uniforms.indexOf(e);return n!==-1&&this.uniforms.splice(n,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const n=e.uniforms;this.uniforms.length=0;for(let i=0,r=n.length;i<r;i++){const s=Array.isArray(n[i])?n[i]:[n[i]];for(let a=0;a<s.length;a++)this.uniforms.push(s[a].clone())}return this}clone(){return new this.constructor().copy(this)}}class fee extends Wy{constructor(e,n,i=1){super(e,n),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const n=super.clone(e);return n.meshPerAttribute=this.meshPerAttribute,n}toJSON(e){const n=super.toJSON(e);return n.isInstancedInterleavedBuffer=!0,n.meshPerAttribute=this.meshPerAttribute,n}}class pee{constructor(e,n,i,r,s){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=n,this.itemSize=i,this.elementSize=r,this.count=s,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,n){return this.type=e,this.elementSize=n,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}class uO{constructor(e,n,i=0,r=1/0){this.ray=new vd(e,n),this.near=i,this.far=r,this.camera=null,this.layers=new ql,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):console.error("THREE.Raycaster: Unsupported camera type: "+n.type)}intersectObject(e,n=!0,i=[]){return M_(e,this,i,n),i.sort(DN),i}intersectObjects(e,n=!0,i=[]){for(let r=0,s=e.length;r<s;r++)M_(e[r],this,i,n);return i.sort(DN),i}}function DN(t,e){return t.distance-e.distance}function M_(t,e,n,i){if(t.layers.test(e.layers)&&t.raycast(e,n),i===!0){const r=t.children;for(let s=0,a=r.length;s<a;s++)M_(r[s],e,n,!0)}}class mee{constructor(e=1,n=0,i=0){return this.radius=e,this.phi=n,this.theta=i,this}set(e,n,i){return this.radius=e,this.phi=n,this.theta=i,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,i){return this.radius=Math.sqrt(e*e+n*n+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,i),this.phi=Math.acos(Pn(n/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class gee{constructor(e=1,n=0,i=0){return this.radius=e,this.theta=n,this.y=i,this}set(e,n,i){return this.radius=e,this.theta=n,this.y=i,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,n,i){return this.radius=Math.sqrt(e*e+i*i),this.theta=Math.atan2(e,i),this.y=n,this}clone(){return new this.constructor().copy(this)}}const FN=new ye;class xee{constructor(e=new ye(1/0,1/0),n=new ye(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;n<i;n++)this.expandByPoint(e[n]);return this}setFromCenterAndSize(e,n){const i=FN.copy(n).multiplyScalar(.5);return this.min.copy(e).sub(i),this.max.copy(e).add(i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,FN).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const jN=new H,Sg=new H;class yee{constructor(e=new H,n=new H){this.start=e,this.end=n}set(e,n){return this.start.copy(e),this.end.copy(n),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,n){return this.delta(n).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,n){jN.subVectors(e,this.start),Sg.subVectors(this.end,this.start);const i=Sg.dot(Sg);let s=Sg.dot(jN)/i;return n&&(s=Pn(s,0,1)),s}closestPointToPoint(e,n,i){const r=this.closestPointToPointParameter(e,n);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const ON=new H;class vee extends Gt{constructor(e,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="SpotLightHelper";const i=new At,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,o=1,c=32;a<c;a++,o++){const u=a/c*Math.PI*2,f=o/c*Math.PI*2;r.push(Math.cos(u),Math.sin(u),1,Math.cos(f),Math.sin(f),1)}i.setAttribute("position",new Ye(r,3));const s=new qi({fog:!1,toneMapped:!1});this.cone=new Zs(i,s),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,n=e*Math.tan(this.light.angle);this.cone.scale.set(n,n,e),ON.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(ON),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const io=new H,Ag=new pt,Yw=new pt;class wee extends Zs{constructor(e){const n=dO(e),i=new At,r=[],s=[],a=new Ue(0,0,1),o=new Ue(0,1,0);for(let u=0;u<n.length;u++){const f=n[u];f.parent&&f.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),s.push(a.r,a.g,a.b),s.push(o.r,o.g,o.b))}i.setAttribute("position",new Ye(r,3)),i.setAttribute("color",new Ye(s,3));const c=new qi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,c),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=n,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const n=this.bones,i=this.geometry,r=i.getAttribute("position");Yw.copy(this.root.matrixWorld).invert();for(let s=0,a=0;s<n.length;s++){const o=n[s];o.parent&&o.parent.isBone&&(Ag.multiplyMatrices(Yw,o.matrixWorld),io.setFromMatrixPosition(Ag),r.setXYZ(a,io.x,io.y,io.z),Ag.multiplyMatrices(Yw,o.parent.matrixWorld),io.setFromMatrixPosition(Ag),r.setXYZ(a+1,io.x,io.y,io.z),a+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function dO(t){const e=[];t.isBone===!0&&e.push(t);for(let n=0;n<t.children.length;n++)e.push.apply(e,dO(t.children[n]));return e}class bee extends $n{constructor(e,n,i){const r=new hp(n,4,2),s=new Qo({wireframe:!0,fog:!1,toneMapped:!1});super(r,s),this.light=e,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const _ee=new H,UN=new Ue,zN=new Ue;class See extends Gt{constructor(e,n,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const r=new dp(n);r.rotateY(Math.PI*.5),this.material=new Qo({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const s=r.getAttribute("position"),a=new Float32Array(s.count*3);r.setAttribute("color",new qt(a,3)),this.add(new $n(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const n=e.geometry.getAttribute("color");UN.copy(this.light.color),zN.copy(this.light.groundColor);for(let i=0,r=n.count;i<r;i++){const s=i<r/2?UN:zN;n.setXYZ(i,s.r,s.g,s.b)}n.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(_ee.setFromMatrixPosition(this.light.matrixWorld).negate())}}class Aee extends Zs{constructor(e=10,n=10,i=4473924,r=8947848){i=new Ue(i),r=new Ue(r);const s=n/2,a=e/n,o=e/2,c=[],u=[];for(let m=0,g=0,y=-o;m<=n;m++,y+=a){c.push(-o,0,y,o,0,y),c.push(y,0,-o,y,0,o);const b=m===s?i:r;b.toArray(u,g),g+=3,b.toArray(u,g),g+=3,b.toArray(u,g),g+=3,b.toArray(u,g),g+=3}const f=new At;f.setAttribute("position",new Ye(c,3)),f.setAttribute("color",new Ye(u,3));const p=new qi({vertexColors:!0,toneMapped:!1});super(f,p),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class Mee extends Zs{constructor(e=10,n=16,i=8,r=64,s=4473924,a=8947848){s=new Ue(s),a=new Ue(a);const o=[],c=[];if(n>1)for(let p=0;p<n;p++){const m=p/n*(Math.PI*2),g=Math.sin(m)*e,y=Math.cos(m)*e;o.push(0,0,0),o.push(g,0,y);const b=p&1?s:a;c.push(b.r,b.g,b.b),c.push(b.r,b.g,b.b)}for(let p=0;p<i;p++){const m=p&1?s:a,g=e-e/i*p;for(let y=0;y<r;y++){let b=y/r*(Math.PI*2),w=Math.sin(b)*g,x=Math.cos(b)*g;o.push(w,0,x),c.push(m.r,m.g,m.b),b=(y+1)/r*(Math.PI*2),w=Math.sin(b)*g,x=Math.cos(b)*g,o.push(w,0,x),c.push(m.r,m.g,m.b)}}const u=new At;u.setAttribute("position",new Ye(o,3)),u.setAttribute("color",new Ye(c,3));const f=new qi({vertexColors:!0,toneMapped:!1});super(u,f),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const BN=new H,Mg=new H,VN=new H;class Tee extends Gt{constructor(e,n,i){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",n===void 0&&(n=1);let r=new At;r.setAttribute("position",new Ye([-n,n,0,n,n,0,n,-n,0,-n,-n,0,-n,n,0],3));const s=new qi({fog:!1,toneMapped:!1});this.lightPlane=new Vo(r,s),this.add(this.lightPlane),r=new At,r.setAttribute("position",new Ye([0,0,0,0,0,1],3)),this.targetLine=new Vo(r,s),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),BN.setFromMatrixPosition(this.light.matrixWorld),Mg.setFromMatrixPosition(this.light.target.matrixWorld),VN.subVectors(Mg,BN),this.lightPlane.lookAt(Mg),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(Mg),this.targetLine.scale.z=VN.length()}}const Tg=new H,Mn=new sp;class Eee extends Zs{constructor(e){const n=new At,i=new qi({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],s=[],a={};o("n1","n2"),o("n2","n4"),o("n4","n3"),o("n3","n1"),o("f1","f2"),o("f2","f4"),o("f4","f3"),o("f3","f1"),o("n1","f1"),o("n2","f2"),o("n3","f3"),o("n4","f4"),o("p","n1"),o("p","n2"),o("p","n3"),o("p","n4"),o("u1","u2"),o("u2","u3"),o("u3","u1"),o("c","t"),o("p","c"),o("cn1","cn2"),o("cn3","cn4"),o("cf1","cf2"),o("cf3","cf4");function o(y,b){c(y),c(b)}function c(y){r.push(0,0,0),s.push(0,0,0),a[y]===void 0&&(a[y]=[]),a[y].push(r.length/3-1)}n.setAttribute("position",new Ye(r,3)),n.setAttribute("color",new Ye(s,3)),super(n,i),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update();const u=new Ue(16755200),f=new Ue(16711680),p=new Ue(43775),m=new Ue(16777215),g=new Ue(3355443);this.setColors(u,f,p,m,g)}setColors(e,n,i,r,s){const o=this.geometry.getAttribute("color");o.setXYZ(0,e.r,e.g,e.b),o.setXYZ(1,e.r,e.g,e.b),o.setXYZ(2,e.r,e.g,e.b),o.setXYZ(3,e.r,e.g,e.b),o.setXYZ(4,e.r,e.g,e.b),o.setXYZ(5,e.r,e.g,e.b),o.setXYZ(6,e.r,e.g,e.b),o.setXYZ(7,e.r,e.g,e.b),o.setXYZ(8,e.r,e.g,e.b),o.setXYZ(9,e.r,e.g,e.b),o.setXYZ(10,e.r,e.g,e.b),o.setXYZ(11,e.r,e.g,e.b),o.setXYZ(12,e.r,e.g,e.b),o.setXYZ(13,e.r,e.g,e.b),o.setXYZ(14,e.r,e.g,e.b),o.setXYZ(15,e.r,e.g,e.b),o.setXYZ(16,e.r,e.g,e.b),o.setXYZ(17,e.r,e.g,e.b),o.setXYZ(18,e.r,e.g,e.b),o.setXYZ(19,e.r,e.g,e.b),o.setXYZ(20,e.r,e.g,e.b),o.setXYZ(21,e.r,e.g,e.b),o.setXYZ(22,e.r,e.g,e.b),o.setXYZ(23,e.r,e.g,e.b),o.setXYZ(24,n.r,n.g,n.b),o.setXYZ(25,n.r,n.g,n.b),o.setXYZ(26,n.r,n.g,n.b),o.setXYZ(27,n.r,n.g,n.b),o.setXYZ(28,n.r,n.g,n.b),o.setXYZ(29,n.r,n.g,n.b),o.setXYZ(30,n.r,n.g,n.b),o.setXYZ(31,n.r,n.g,n.b),o.setXYZ(32,i.r,i.g,i.b),o.setXYZ(33,i.r,i.g,i.b),o.setXYZ(34,i.r,i.g,i.b),o.setXYZ(35,i.r,i.g,i.b),o.setXYZ(36,i.r,i.g,i.b),o.setXYZ(37,i.r,i.g,i.b),o.setXYZ(38,r.r,r.g,r.b),o.setXYZ(39,r.r,r.g,r.b),o.setXYZ(40,s.r,s.g,s.b),o.setXYZ(41,s.r,s.g,s.b),o.setXYZ(42,s.r,s.g,s.b),o.setXYZ(43,s.r,s.g,s.b),o.setXYZ(44,s.r,s.g,s.b),o.setXYZ(45,s.r,s.g,s.b),o.setXYZ(46,s.r,s.g,s.b),o.setXYZ(47,s.r,s.g,s.b),o.setXYZ(48,s.r,s.g,s.b),o.setXYZ(49,s.r,s.g,s.b),o.needsUpdate=!0}update(){const e=this.geometry,n=this.pointMap,i=1,r=1;Mn.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),In("c",n,e,Mn,0,0,-1),In("t",n,e,Mn,0,0,1),In("n1",n,e,Mn,-i,-r,-1),In("n2",n,e,Mn,i,-r,-1),In("n3",n,e,Mn,-i,r,-1),In("n4",n,e,Mn,i,r,-1),In("f1",n,e,Mn,-i,-r,1),In("f2",n,e,Mn,i,-r,1),In("f3",n,e,Mn,-i,r,1),In("f4",n,e,Mn,i,r,1),In("u1",n,e,Mn,i*.7,r*1.1,-1),In("u2",n,e,Mn,-i*.7,r*1.1,-1),In("u3",n,e,Mn,0,r*2,-1),In("cf1",n,e,Mn,-i,0,1),In("cf2",n,e,Mn,i,0,1),In("cf3",n,e,Mn,0,-r,1),In("cf4",n,e,Mn,0,r,1),In("cn1",n,e,Mn,-i,0,-1),In("cn2",n,e,Mn,i,0,-1),In("cn3",n,e,Mn,0,-r,-1),In("cn4",n,e,Mn,0,r,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function In(t,e,n,i,r,s,a){Tg.set(r,s,a).unproject(i);const o=e[t];if(o!==void 0){const c=n.getAttribute("position");for(let u=0,f=o.length;u<f;u++)c.setXYZ(o[u],Tg.x,Tg.y,Tg.z)}}const Eg=new Hi;class Cee extends Zs{constructor(e,n=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(8*3),s=new At;s.setIndex(new qt(i,1)),s.setAttribute("position",new qt(r,3)),super(s,new qi({color:n,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&Eg.setFromObject(this.object),Eg.isEmpty())return;const n=Eg.min,i=Eg.max,r=this.geometry.attributes.position,s=r.array;s[0]=i.x,s[1]=i.y,s[2]=i.z,s[3]=n.x,s[4]=i.y,s[5]=i.z,s[6]=n.x,s[7]=n.y,s[8]=i.z,s[9]=i.x,s[10]=n.y,s[11]=i.z,s[12]=i.x,s[13]=i.y,s[14]=n.z,s[15]=n.x,s[16]=i.y,s[17]=n.z,s[18]=n.x,s[19]=n.y,s[20]=n.z,s[21]=i.x,s[22]=n.y,s[23]=n.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,n){return super.copy(e,n),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Pee extends Zs{constructor(e,n=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],s=new At;s.setIndex(new qt(i,1)),s.setAttribute("position",new Ye(r,3)),super(s,new qi({color:n,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const n=this.box;n.isEmpty()||(n.getCenter(this.position),n.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class Nee extends Vo{constructor(e,n=1,i=16776960){const r=i,s=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],a=new At;a.setAttribute("position",new Ye(s,3)),a.computeBoundingSphere(),super(a,new qi({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=n;const o=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],c=new At;c.setAttribute("position",new Ye(o,3)),c.computeBoundingSphere(),this.add(new $n(c,new Qo({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const HN=new H;let Cg,Qw;class Ree extends Gt{constructor(e=new H(0,0,1),n=new H(0,0,0),i=1,r=16776960,s=i*.2,a=s*.2){super(),this.type="ArrowHelper",Cg===void 0&&(Cg=new At,Cg.setAttribute("position",new Ye([0,0,0,0,1,0],3)),Qw=new bd(0,.5,1,5,1),Qw.translate(0,-.5,0)),this.position.copy(n),this.line=new Vo(Cg,new qi({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new $n(Qw,new Qo({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(i,s,a)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{HN.set(e.z,0,-e.x).normalize();const n=Math.acos(e.y);this.quaternion.setFromAxisAngle(HN,n)}}setLength(e,n=e*.2,i=n*.2){this.line.scale.set(1,Math.max(1e-4,e-n),1),this.line.updateMatrix(),this.cone.scale.set(i,n,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Iee extends Zs{constructor(e=1){const n=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new At;r.setAttribute("position",new Ye(n,3)),r.setAttribute("color",new Ye(i,3));const s=new qi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,n,i){const r=new Ue,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(n),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class kee{constructor(){this.type="ShapePath",this.color=new Ue,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new Rf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,i,r){return this.currentPath.quadraticCurveTo(e,n,i,r),this}bezierCurveTo(e,n,i,r,s,a){return this.currentPath.bezierCurveTo(e,n,i,r,s,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(x){const _=[];for(let S=0,M=x.length;S<M;S++){const E=x[S],C=new $l;C.curves=E.curves,_.push(C)}return _}function i(x,_){const S=_.length;let M=!1;for(let E=S-1,C=0;C<S;E=C++){let N=_[E],D=_[C],R=D.x-N.x,k=D.y-N.y;if(Math.abs(k)>Number.EPSILON){if(k<0&&(N=_[C],R=-R,D=_[E],k=-k),x.y<N.y||x.y>D.y)continue;if(x.y===N.y){if(x.x===N.x)return!0}else{const V=k*(x.x-N.x)-R*(x.y-N.y);if(V===0)return!0;if(V<0)continue;M=!M}}else{if(x.y!==N.y)continue;if(D.x<=x.x&&x.x<=N.x||N.x<=x.x&&x.x<=D.x)return!0}}return M}const r=qs.isClockWise,s=this.subPaths;if(s.length===0)return[];let a,o,c;const u=[];if(s.length===1)return o=s[0],c=new $l,c.curves=o.curves,u.push(c),u;let f=!r(s[0].getPoints());f=e?!f:f;const p=[],m=[];let g=[],y=0,b;m[y]=void 0,g[y]=[];for(let x=0,_=s.length;x<_;x++)o=s[x],b=o.getPoints(),a=r(b),a=e?!a:a,a?(!f&&m[y]&&y++,m[y]={s:new $l,p:b},m[y].s.curves=o.curves,f&&y++,g[y]=[]):g[y].push({h:o,p:b[0]});if(!m[0])return n(s);if(m.length>1){let x=!1,_=0;for(let S=0,M=m.length;S<M;S++)p[S]=[];for(let S=0,M=m.length;S<M;S++){const E=g[S];for(let C=0;C<E.length;C++){const N=E[C];let D=!0;for(let R=0;R<m.length;R++)i(N.p,m[R].p)&&(S!==R&&_++,D?(D=!1,p[R].push(N)):x=!0);D&&p[S].push(N)}}_>0&&x===!1&&(g=p)}let w;for(let x=0,_=m.length;x<_;x++){c=m[x].s,u.push(c),w=g[x];for(let S=0,M=w.length;S<M;S++)c.holes.push(w[S].h)}return u}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ly}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Ly);const Lee=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:CA,AddEquation:ho,AddOperation:EF,AdditiveAnimationBlendMode:jA,AdditiveBlending:O1,AgXToneMapping:IF,AlphaFormat:FF,AlwaysCompare:ej,AlwaysDepth:wF,AlwaysStencilFunc:m_,AmbientLight:tO,AnimationAction:cO,AnimationClip:jf,AnimationLoader:DJ,AnimationMixer:uee,AnimationObjectGroup:lee,AnimationUtils:RJ,ArcCurve:Tj,ArrayCamera:gj,ArrowHelper:Ree,AttachedBindMode:H1,Audio:oO,AudioAnalyser:ZJ,AudioContext:hM,AudioListener:YJ,AudioLoader:qJ,AxesHelper:Iee,BackSide:Vi,BasicDepthPacking:GF,BasicShadowMap:nF,BatchedMesh:Sj,Bone:ZA,BooleanKeyframeTrack:dc,Box2:xee,Box3:Hi,Box3Helper:Pee,BoxGeometry:uc,BoxHelper:Cee,BufferAttribute:qt,BufferGeometry:At,BufferGeometryLoader:aO,ByteType:LF,Cache:ba,Camera:sp,CameraHelper:Eee,CanvasTexture:tJ,CapsuleGeometry:$y,CatmullRomCurve3:Ej,CineonToneMapping:NF,CircleGeometry:Yy,ClampToEdgeWrapping:Ci,Clock:fM,Color:Ue,ColorKeyframeTrack:cM,ColorManagement:$t,CompressedArrayTexture:JZ,CompressedCubeTexture:eJ,CompressedTexture:qy,CompressedTextureLoader:FJ,ConeGeometry:Qy,ConstantAlphaFactor:xF,ConstantColorFactor:mF,CubeCamera:oj,CubeReflectionMapping:La,CubeRefractionMapping:zo,CubeTexture:ap,CubeTextureLoader:jJ,CubeUVReflectionMapping:yd,CubicBezierCurve:tM,CubicBezierCurve3:Cj,CubicInterpolant:Xj,CullFaceBack:j1,CullFaceFront:tF,CullFaceFrontBack:Vq,CullFaceNone:eF,Curve:vs,CurvePath:Nj,CustomBlending:iF,CustomToneMapping:RF,CylinderGeometry:bd,Cylindrical:gee,Data3DTexture:VA,DataArrayTexture:zy,DataTexture:Xl,DataTextureLoader:OJ,DataUtils:ZX,DecrementStencilOp:eX,DecrementWrapStencilOp:nX,DefaultLoadingManager:Qj,DepthFormat:Ro,DepthStencilFormat:rc,DepthTexture:qA,DetachedBindMode:kF,DirectionalLight:eO,DirectionalLightHelper:Tee,DiscreteInterpolant:$j,DisplayP3ColorSpace:Uy,DodecahedronGeometry:Ky,DoubleSide:js,DstAlphaFactor:uF,DstColorFactor:hF,DynamicCopyUsage:xX,DynamicDrawUsage:dX,DynamicReadUsage:pX,EdgesGeometry:Rj,EllipseCurve:Xy,EqualCompare:QF,EqualDepth:_F,EqualStencilFunc:aX,EquirectangularReflectionMapping:vf,EquirectangularRefractionMapping:wf,Euler:rp,EventDispatcher:Oa,ExtrudeGeometry:Jy,FileLoader:Da,Float16BufferAttribute:r$,Float32BufferAttribute:Ye,Float64BufferAttribute:s$,FloatType:ds,Fog:Hy,FogExp2:Vy,FramebufferTexture:ZZ,FrontSide:ka,Frustum:op,GLBufferAttribute:pee,GLSL1:vX,GLSL3:g_,GreaterCompare:KF,GreaterDepth:AF,GreaterEqualCompare:JF,GreaterEqualDepth:SF,GreaterEqualStencilFunc:uX,GreaterStencilFunc:lX,GridHelper:Aee,Group:Su,HalfFloatType:td,HemisphereLight:Kj,HemisphereLightHelper:See,IcosahedronGeometry:ev,ImageBitmapLoader:GJ,ImageLoader:Of,ImageUtils:BA,IncrementStencilOp:Jq,IncrementWrapStencilOp:tX,InstancedBufferAttribute:sd,InstancedBufferGeometry:sO,InstancedInterleavedBuffer:fee,InstancedMesh:_j,Int16BufferAttribute:n$,Int32BufferAttribute:i$,Int8BufferAttribute:JX,IntType:NA,InterleavedBuffer:Wy,InterleavedBufferAttribute:sc,Interpolant:fp,InterpolateDiscrete:Sf,InterpolateLinear:Af,InterpolateSmooth:tx,InvertStencilOp:iX,KeepStencilOp:Sl,KeyframeTrack:ws,LOD:wj,LatheGeometry:up,Layers:ql,LessCompare:YF,LessDepth:bF,LessEqualCompare:UA,LessEqualDepth:yf,LessEqualStencilFunc:oX,LessStencilFunc:sX,Light:Zo,LightProbe:rO,Line:Vo,Line3:yee,LineBasicMaterial:qi,LineCurve:nM,LineCurve3:Pj,LineDashedMaterial:Wj,LineLoop:Aj,LineSegments:Zs,LinearDisplayP3ColorSpace:ip,LinearEncoding:OA,LinearFilter:jn,LinearInterpolant:lM,LinearMipMapLinearFilter:Xq,LinearMipMapNearestFilter:qq,LinearMipmapLinearFilter:Bo,LinearMipmapNearestFilter:PA,LinearSRGBColorSpace:Ys,LinearToneMapping:CF,LinearTransfer:Tf,Loader:or,LoaderUtils:A_,LoadingManager:uM,LoopOnce:VF,LoopPingPong:WF,LoopRepeat:HF,LuminanceAlphaFormat:OF,LuminanceFormat:jF,MOUSE:zq,Material:Ii,MaterialLoader:ov,MathUtils:LX,Matrix3:Pt,Matrix4:pt,MaxEquation:V1,Mesh:$n,MeshBasicMaterial:Qo,MeshDepthMaterial:XA,MeshDistanceMaterial:$A,MeshLambertMaterial:Vj,MeshMatcapMaterial:Hj,MeshNormalMaterial:Bj,MeshPhongMaterial:Uj,MeshPhysicalMaterial:Oj,MeshStandardMaterial:aM,MeshToonMaterial:zj,MinEquation:B1,MirroredRepeatWrapping:_f,MixOperation:TF,MultiplyBlending:z1,MultiplyOperation:np,NearestFilter:Ln,NearestMipMapLinearFilter:Gq,NearestMipMapNearestFilter:Wq,NearestMipmapLinearFilter:Fh,NearestMipmapNearestFilter:Wx,NeverCompare:$F,NeverDepth:vF,NeverStencilFunc:rX,NoBlending:Ma,NoColorSpace:xr,NoToneMapping:Ws,NormalAnimationBlendMode:Oy,NormalBlending:Wl,NotEqualCompare:ZF,NotEqualDepth:MF,NotEqualStencilFunc:cX,NumberKeyframeTrack:Df,Object3D:Gt,ObjectLoader:HJ,ObjectSpaceNormalMap:XF,OctahedronGeometry:dp,OneFactor:oF,OneMinusConstantAlphaFactor:yF,OneMinusConstantColorFactor:gF,OneMinusDstAlphaFactor:dF,OneMinusDstColorFactor:fF,OneMinusSrcAlphaFactor:Hx,OneMinusSrcColorFactor:cF,OrthographicCamera:cp,P3Primaries:Cf,PCFShadowMap:Dy,PCFSoftShadowMap:Dh,PMREMGenerator:y_,Path:Rf,PerspectiveCamera:si,Plane:lo,PlaneGeometry:lp,PlaneHelper:Nee,PointLight:Jj,PointLightHelper:bee,Points:Mj,PointsMaterial:JA,PolarGridHelper:Mee,PolyhedronGeometry:Ko,PositionalAudio:KJ,PropertyBinding:Ut,PropertyMixer:lO,QuadraticBezierCurve:iM,QuadraticBezierCurve3:rM,Quaternion:ar,QuaternionKeyframeTrack:_d,QuaternionLinearInterpolant:Yj,RED_GREEN_RGTC2_Format:f_,RED_RGTC1_Format:BF,REVISION:Ly,RGBADepthPacking:qF,RGBAFormat:zi,RGBAIntegerFormat:DA,RGBA_ASTC_10x10_Format:o_,RGBA_ASTC_10x5_Format:r_,RGBA_ASTC_10x6_Format:s_,RGBA_ASTC_10x8_Format:a_,RGBA_ASTC_12x10_Format:l_,RGBA_ASTC_12x12_Format:c_,RGBA_ASTC_4x4_Format:Q1,RGBA_ASTC_5x4_Format:K1,RGBA_ASTC_5x5_Format:Z1,RGBA_ASTC_6x5_Format:J1,RGBA_ASTC_6x6_Format:e_,RGBA_ASTC_8x5_Format:t_,RGBA_ASTC_8x6_Format:n_,RGBA_ASTC_8x8_Format:i_,RGBA_BPTC_Format:ex,RGBA_ETC2_EAC_Format:Y1,RGBA_PVRTC_2BPPV1_Format:X1,RGBA_PVRTC_4BPPV1_Format:q1,RGBA_S3TC_DXT1_Format:Kg,RGBA_S3TC_DXT3_Format:Zg,RGBA_S3TC_DXT5_Format:Jg,RGB_BPTC_SIGNED_Format:u_,RGB_BPTC_UNSIGNED_Format:d_,RGB_ETC1_Format:FA,RGB_ETC2_Format:$1,RGB_PVRTC_2BPPV1_Format:G1,RGB_PVRTC_4BPPV1_Format:W1,RGB_S3TC_DXT1_Format:Qg,RGFormat:zF,RGIntegerFormat:LA,RawShaderMaterial:jj,Ray:vd,Raycaster:uO,Rec709Primaries:Ef,RectAreaLight:nO,RedFormat:UF,RedIntegerFormat:kA,ReinhardToneMapping:PF,RenderTarget:ij,RepeatWrapping:bf,ReplaceStencilOp:Zq,ReverseSubtractEquation:sF,RingGeometry:tv,SIGNED_RED_GREEN_RGTC2_Format:p_,SIGNED_RED_RGTC1_Format:h_,SRGBColorSpace:qn,SRGBTransfer:en,Scene:QA,ShaderChunk:Tt,ShaderLib:us,ShaderMaterial:Qs,ShadowMaterial:Fj,Shape:$l,ShapeGeometry:nv,ShapePath:kee,ShapeUtils:qs,ShortType:DF,Skeleton:Gy,SkeletonHelper:wee,SkinnedMesh:bj,Source:Il,Sphere:Ni,SphereGeometry:hp,Spherical:mee,SphericalHarmonics3:iO,SplineCurve:sM,SpotLight:Zj,SpotLightHelper:vee,Sprite:vj,SpriteMaterial:KA,SrcAlphaFactor:Vx,SrcAlphaSaturateFactor:pF,SrcColorFactor:lF,StaticCopyUsage:gX,StaticDrawUsage:Pf,StaticReadUsage:fX,StereoCamera:XJ,StreamCopyUsage:yX,StreamDrawUsage:hX,StreamReadUsage:mX,StringKeyframeTrack:hc,SubtractEquation:rF,SubtractiveBlending:U1,TOUCH:Bq,TangentSpaceNormalMap:Yo,TetrahedronGeometry:iv,Texture:Un,TextureLoader:UJ,TorusGeometry:rv,TorusKnotGeometry:sv,Triangle:er,TriangleFanDrawMode:Qq,TriangleStripDrawMode:Yq,TrianglesDrawMode:$q,TubeGeometry:av,TwoPassDoubleSide:Hq,UVMapping:Fy,Uint16BufferAttribute:HA,Uint32BufferAttribute:WA,Uint8BufferAttribute:e$,Uint8ClampedBufferAttribute:t$,Uniform:gM,UniformsGroup:hee,UniformsLib:ke,UniformsUtils:aj,UnsignedByteType:Gs,UnsignedInt248Type:No,UnsignedIntType:wa,UnsignedShort4444Type:RA,UnsignedShort5551Type:IA,UnsignedShortType:jy,VSMShadowMap:ss,Vector2:ye,Vector3:H,Vector4:Yt,VectorKeyframeTrack:Ff,VideoTexture:KZ,WebGL1Renderer:xj,WebGL3DRenderTarget:zX,WebGLArrayRenderTarget:UX,WebGLCoordinateSystem:hs,WebGLCubeRenderTarget:lj,WebGLMultipleRenderTargets:BX,WebGLRenderTarget:ys,WebGLRenderer:YA,WebGLUtils:mj,WebGPUCoordinateSystem:nd,WireframeGeometry:Dj,WrapAroundEnding:Mf,ZeroCurvatureEnding:Nl,ZeroFactor:aF,ZeroSlopeEnding:Rl,ZeroStencilOp:Kq,_SRGBAFormat:Gx,createCanvasElement:nj,sRGBEncoding:Io},Symbol.toStringTag,{value:"Module"}));var hO={exports:{}},fc={};/**
* @license React
* react-reconciler-constants.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/fc.ConcurrentRoot=1;fc.ContinuousEventPriority=4;fc.DefaultEventPriority=16;fc.DiscreteEventPriority=1;fc.IdleEventPriority=536870912;fc.LegacyRoot=0;hO.exports=fc;var Mu=hO.exports;function Dee(t){let e;const n=new Set,i=(u,f)=>{const p=typeof u=="function"?u(e):u;if(p!==e){const m=e;e=f?p:Object.assign({},e,p),n.forEach(g=>g(e,m))}},r=()=>e,s=(u,f=r,p=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let m=f(e);function g(){const y=f(e);if(!p(m,y)){const b=m;u(m=y,b)}}return n.add(g),()=>n.delete(g)},c={setState:i,getState:r,subscribe:(u,f,p)=>f||p?s(u,f,p):(n.add(u),()=>n.delete(u)),destroy:()=>n.clear()};return e=t(i,r,c),c}const Fee=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),WN=Fee?I.useEffect:I.useLayoutEffect;function jee(t){const e=typeof t=="function"?Dee(t):t,n=(i=e.getState,r=Object.is)=>{const[,s]=I.useReducer(w=>w+1,0),a=e.getState(),o=I.useRef(a),c=I.useRef(i),u=I.useRef(r),f=I.useRef(!1),p=I.useRef();p.current===void 0&&(p.current=i(a));let m,g=!1;(o.current!==a||c.current!==i||u.current!==r||f.current)&&(m=i(a),g=!r(p.current,m)),WN(()=>{g&&(p.current=m),o.current=a,c.current=i,u.current=r,f.current=!1});const y=I.useRef(a);WN(()=>{const w=()=>{try{const _=e.getState(),S=c.current(_);u.current(p.current,S)||(o.current=_,p.current=S,s())}catch{f.current=!0,s()}},x=e.subscribe(w);return e.getState()!==y.current&&w(),x},[]);const b=g?m:p.current;return I.useDebugValue(b),b};return Object.assign(n,e),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[n,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},n}var fO={exports:{}},Kw={exports:{}},Zw={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var GN;function Oee(){return GN||(GN=1,function(t){function e(L,j){var B=L.length;L.push(j);e:for(;0<B;){var Y=B-1>>>1,Z=L[Y];if(0<r(Z,j))L[Y]=j,L[B]=Z,B=Y;else break e}}function n(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var j=L[0],B=L.pop();if(B!==j){L[0]=B;e:for(var Y=0,Z=L.length,K=Z>>>1;Y<K;){var se=2*(Y+1)-1,ge=L[se],Ce=se+1,xe=L[Ce];if(0>r(ge,B))Ce<Z&&0>r(xe,ge)?(L[Y]=xe,L[Ce]=B,Y=Ce):(L[Y]=ge,L[se]=B,Y=se);else if(Ce<Z&&0>r(xe,B))L[Y]=xe,L[Ce]=B,Y=Ce;else break e}}return j}function r(L,j){var B=L.sortIndex-j.sortIndex;return B!==0?B:L.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var c=[],u=[],f=1,p=null,m=3,g=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(L){for(var j=n(u);j!==null;){if(j.callback===null)i(u);else if(j.startTime<=L)i(u),j.sortIndex=j.expirationTime,e(c,j);else break;j=n(u)}}function M(L){if(b=!1,S(L),!y)if(n(c)!==null)y=!0,X(E);else{var j=n(u);j!==null&&ee(M,j.startTime-L)}}function E(L,j){y=!1,b&&(b=!1,x(D),D=-1),g=!0;var B=m;try{for(S(j),p=n(c);p!==null&&(!(p.expirationTime>j)||L&&!V());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,m=p.priorityLevel;var Z=Y(p.expirationTime<=j);j=t.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(c)&&i(c),S(j)}else i(c);p=n(c)}if(p!==null)var K=!0;else{var se=n(u);se!==null&&ee(M,se.startTime-j),K=!1}return K}finally{p=null,m=B,g=!1}}var C=!1,N=null,D=-1,R=5,k=-1;function V(){return!(t.unstable_now()-k<R)}function G(){if(N!==null){var L=t.unstable_now();k=L;var j=!0;try{j=N(!0,L)}finally{j?ie():(C=!1,N=null)}}else C=!1}var ie;if(typeof _=="function")ie=function(){_(G)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,$=z.port2;z.port1.onmessage=G,ie=function(){$.postMessage(null)}}else ie=function(){w(G,0)};function X(L){N=L,C||(C=!0,ie())}function ee(L,j){D=w(function(){L(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){y||g||(y=!0,X(E))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(L){switch(m){case 1:case 2:case 3:var j=3;break;default:j=m}var B=m;m=j;try{return L()}finally{m=B}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,j){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var B=m;m=L;try{return j()}finally{m=B}},t.unstable_scheduleCallback=function(L,j,B){var Y=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Y+B:Y):B=Y,L){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=B+Z,L={id:f++,callback:j,priorityLevel:L,startTime:B,expirationTime:Z,sortIndex:-1},B>Y?(L.sortIndex=B,e(u,L),n(c)===null&&L===n(u)&&(b?(x(D),D=-1):b=!0,ee(M,B-Y))):(L.sortIndex=Z,e(c,L),y||g||(y=!0,X(E))),L},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(L){var j=m;return function(){var B=m;m=j;try{return L.apply(this,arguments)}finally{m=B}}}}(Zw)),Zw}var qN;function Uee(){return qN||(qN=1,Kw.exports=Oee()),Kw.exports}/**
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var zee=function(e){var n={},i=I,r=Uee(),s=Object.assign;function a(d){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+d,v=1;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v]);return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=Symbol.for("react.element"),u=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),y=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),M=Symbol.for("react.offscreen"),E=Symbol.iterator;function C(d){return d===null||typeof d!="object"?null:(d=E&&d[E]||d["@@iterator"],typeof d=="function"?d:null)}function N(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case f:return"Fragment";case u:return"Portal";case m:return"Profiler";case p:return"StrictMode";case w:return"Suspense";case x:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case y:return(d.displayName||"Context")+".Consumer";case g:return(d._context.displayName||"Context")+".Provider";case b:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case _:return h=d.displayName||null,h!==null?h:N(d.type)||"Memo";case S:h=d._payload,d=d._init;try{return N(d(h))}catch{}}return null}function D(d){var h=d.type;switch(d.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=h.render,d=d.displayName||d.name||"",h.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return N(h);case 8:return h===p?"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 h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function R(d){var h=d,v=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,h.flags&4098&&(v=h.return),d=h.return;while(d)}return h.tag===3?v:null}function k(d){if(R(d)!==d)throw Error(a(188))}function V(d){var h=d.alternate;if(!h){if(h=R(d),h===null)throw Error(a(188));return h!==d?null:d}for(var v=d,A=h;;){var T=v.return;if(T===null)break;var P=T.alternate;if(P===null){if(A=T.return,A!==null){v=A;continue}break}if(T.child===P.child){for(P=T.child;P;){if(P===v)return k(T),d;if(P===A)return k(T),h;P=P.sibling}throw Error(a(188))}if(v.return!==A.return)v=T,A=P;else{for(var W=!1,J=T.child;J;){if(J===v){W=!0,v=T,A=P;break}if(J===A){W=!0,A=T,v=P;break}J=J.sibling}if(!W){for(J=P.child;J;){if(J===v){W=!0,v=P,A=T;break}if(J===A){W=!0,A=P,v=T;break}J=J.sibling}if(!W)throw Error(a(189))}}if(v.alternate!==A)throw Error(a(190))}if(v.tag!==3)throw Error(a(188));return v.stateNode.current===v?d:h}function G(d){return d=V(d),d!==null?ie(d):null}function ie(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var h=ie(d);if(h!==null)return h;d=d.sibling}return null}function z(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){if(d.tag!==4){var h=z(d);if(h!==null)return h}d=d.sibling}return null}var $=Array.isArray,X=e.getPublicInstance,ee=e.getRootHostContext,L=e.getChildHostContext,j=e.prepareForCommit,B=e.resetAfterCommit,Y=e.createInstance,Z=e.appendInitialChild,K=e.finalizeInitialChildren,se=e.prepareUpdate,ge=e.shouldSetTextContent,Ce=e.createTextInstance,xe=e.scheduleTimeout,nt=e.cancelTimeout,it=e.noTimeout,ze=e.isPrimaryRenderer,Xe=e.supportsMutation,q=e.supportsPersistence,_e=e.supportsHydration,fe=e.getInstanceFromNode,Te=e.preparePortalMount,he=e.getCurrentEventPriority,Qe=e.detachDeletedInstance,De=e.supportsMicrotasks,O=e.scheduleMicrotask,F=e.supportsTestSelectors,ne=e.findFiberRoot,Se=e.getBoundingRect,ve=e.getTextContent,we=e.isHiddenSubtree,$e=e.matchAccessibilityRole,Pe=e.setFocusIfFocusable,je=e.setupIntersectionObserver,st=e.appendChild,gt=e.appendChildToContainer,be=e.commitTextUpdate,Dt=e.commitMount,St=e.commitUpdate,ut=e.insertBefore,Ke=e.insertInContainerBefore,Ve=e.removeChild,dt=e.removeChildFromContainer,jt=e.resetTextContent,Jt=e.hideInstance,vt=e.hideTextInstance,Re=e.unhideInstance,Q=e.unhideTextInstance,Le=e.clearContainer,Ie=e.cloneInstance,ot=e.createContainerChildSet,Me=e.appendChildToContainerChildSet,Je=e.finalizeContainerChildren,rt=e.replaceContainerChildren,Ot=e.cloneHiddenInstance,Xt=e.cloneHiddenTextInstance,It=e.canHydrateInstance,nn=e.canHydrateTextInstance,hn=e.canHydrateSuspenseInstance,Xi=e.isSuspenseInstancePending,Sd=e.isSuspenseInstanceFallback,mc=e.registerSuspenseInstanceRetry,Ua=e.getNextHydratableSibling,gc=e.getFirstHydratableChild,mp=e.getFirstHydratableChildWithinContainer,gp=e.getFirstHydratableChildWithinSuspenseInstance,dv=e.hydrateInstance,hv=e.hydrateTextInstance,fv=e.hydrateSuspenseInstance,U=e.getNextHydratableInstanceAfterSuspenseInstance,re=e.commitHydratedContainer,le=e.commitHydratedSuspenseInstance,ce=e.clearSuspenseBoundary,oe=e.clearSuspenseBoundaryFromContainer,Be=e.shouldDeleteUnhydratedTailInstances,et=e.didNotMatchHydratedContainerTextInstance,lt=e.didNotMatchHydratedTextInstance,ht;function xt(d){if(ht===void 0)try{throw Error()}catch(v){var h=v.stack.trim().match(/\n( *(at )?)/);ht=h&&h[1]||""}return`
`+ht+d}var mt=!1;function yt(d,h){if(!d||mt)return"";mt=!0;var v=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(Ne){var A=Ne}Reflect.construct(d,[],h)}else{try{h.call()}catch(Ne){A=Ne}d.call(h.prototype)}else{try{throw Error()}catch(Ne){A=Ne}d()}}catch(Ne){if(Ne&&A&&typeof Ne.stack=="string"){for(var T=Ne.stack.split(`
`),P=A.stack.split(`
`),W=T.length-1,J=P.length-1;1<=W&&0<=J&&T[W]!==P[J];)J--;for(;1<=W&&0<=J;W--,J--)if(T[W]!==P[J]){if(W!==1||J!==1)do if(W--,J--,0>J||T[W]!==P[J]){var de=`
`+T[W].replace(" at new "," at ");return d.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",d.displayName)),de}while(1<=W&&0<=J);break}}}finally{mt=!1,Error.prepareStackTrace=v}return(d=d?d.displayName||d.name:"")?xt(d):""}var gn=Object.prototype.hasOwnProperty,li=[],rn=-1;function Zn(d){return{current:d}}function ft(d){0>rn||(d.current=li[rn],li[rn]=null,rn--)}function Ge(d,h){rn++,li[rn]=d.current,d.current=h}var Cr={},Nt=Zn(Cr),Sn=Zn(!1),_s=Cr;function Pr(d,h){var v=d.type.contextTypes;if(!v)return Cr;var A=d.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===h)return A.__reactInternalMemoizedMaskedChildContext;var T={},P;for(P in v)T[P]=h[P];return A&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=h,d.__reactInternalMemoizedMaskedChildContext=T),T}function Jn(d){return d=d.childContextTypes,d!=null}function Nn(){ft(Sn),ft(Nt)}function Ss(d,h,v){if(Nt.current!==Cr)throw Error(a(168));Ge(Nt,h),Ge(Sn,v)}function xc(d,h,v){var A=d.stateNode;if(h=h.childContextTypes,typeof A.getChildContext!="function")return v;A=A.getChildContext();for(var T in A)if(!(T in h))throw Error(a(108,D(d)||"Unknown",T));return s({},v,A)}function ci(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Cr,_s=Nt.current,Ge(Nt,d),Ge(Sn,Sn.current),!0}function yc(d,h,v){var A=d.stateNode;if(!A)throw Error(a(169));v?(d=xc(d,h,_s),A.__reactInternalMemoizedMergedChildContext=d,ft(Sn),ft(Nt),Ge(Nt,d)):ft(Sn),Ge(Sn,v)}var lr=Math.clz32?Math.clz32:i4,xp=Math.log,n4=Math.LN2;function i4(d){return d>>>=0,d===0?32:31-(xp(d)/n4|0)|0}var yp=64,vp=4194304;function Ad(d){switch(d&-d){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 d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function wp(d,h){var v=d.pendingLanes;if(v===0)return 0;var A=0,T=d.suspendedLanes,P=d.pingedLanes,W=v&268435455;if(W!==0){var J=W&~T;J!==0?A=Ad(J):(P&=W,P!==0&&(A=Ad(P)))}else W=v&~T,W!==0?A=Ad(W):P!==0&&(A=Ad(P));if(A===0)return 0;if(h!==0&&h!==A&&!(h&T)&&(T=A&-A,P=h&-h,T>=P||T===16&&(P&4194240)!==0))return h;if(A&4&&(A|=v&16),h=d.entangledLanes,h!==0)for(d=d.entanglements,h&=A;0<h;)v=31-lr(h),T=1<<v,A|=d[v],h&=~T;return A}function r4(d,h){switch(d){case 1:case 2:case 4:return h+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 h+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 s4(d,h){for(var v=d.suspendedLanes,A=d.pingedLanes,T=d.expirationTimes,P=d.pendingLanes;0<P;){var W=31-lr(P),J=1<<W,de=T[W];de===-1?(!(J&v)||J&A)&&(T[W]=r4(J,h)):de<=h&&(d.expiredLanes|=J),P&=~J}}function pv(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function mv(d){for(var h=[],v=0;31>v;v++)h.push(d);return h}function Md(d,h,v){d.pendingLanes|=h,h!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,h=31-lr(h),d[h]=v}function a4(d,h){var v=d.pendingLanes&~h;d.pendingLanes=h,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=h,d.mutableReadLanes&=h,d.entangledLanes&=h,h=d.entanglements;var A=d.eventTimes;for(d=d.expirationTimes;0<v;){var T=31-lr(v),P=1<<T;h[T]=0,A[T]=-1,d[T]=-1,v&=~P}}function gv(d,h){var v=d.entangledLanes|=h;for(d=d.entanglements;v;){var A=31-lr(v),T=1<<A;T&h|d[A]&h&&(d[A]|=h),v&=~T}}var Bt=0;function CM(d){return d&=-d,1<d?4<d?d&268435455?16:536870912:4:1}var xv=r.unstable_scheduleCallback,PM=r.unstable_cancelCallback,o4=r.unstable_shouldYield,l4=r.unstable_requestPaint,ei=r.unstable_now,yv=r.unstable_ImmediatePriority,c4=r.unstable_UserBlockingPriority,vv=r.unstable_NormalPriority,u4=r.unstable_IdlePriority,bp=null,As=null;function d4(d){if(As&&typeof As.onCommitFiberRoot=="function")try{As.onCommitFiberRoot(bp,d,void 0,(d.current.flags&128)===128)}catch{}}function h4(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var Ms=typeof Object.is=="function"?Object.is:h4,Js=null,_p=!1,wv=!1;function NM(d){Js===null?Js=[d]:Js.push(d)}function f4(d){_p=!0,NM(d)}function Ts(){if(!wv&&Js!==null){wv=!0;var d=0,h=Bt;try{var v=Js;for(Bt=1;d<v.length;d++){var A=v[d];do A=A(!0);while(A!==null)}Js=null,_p=!1}catch(T){throw Js!==null&&(Js=Js.slice(d+1)),xv(yv,Ts),T}finally{Bt=h,wv=!1}}return null}var p4=o.ReactCurrentBatchConfig;function Sp(d,h){if(Ms(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var v=Object.keys(d),A=Object.keys(h);if(v.length!==A.length)return!1;for(A=0;A<v.length;A++){var T=v[A];if(!gn.call(h,T)||!Ms(d[T],h[T]))return!1}return!0}function m4(d){switch(d.tag){case 5:return xt(d.type);case 16:return xt("Lazy");case 13:return xt("Suspense");case 19:return xt("SuspenseList");case 0:case 2:case 15:return d=yt(d.type,!1),d;case 11:return d=yt(d.type.render,!1),d;case 1:return d=yt(d.type,!0),d;default:return""}}function Yr(d,h){if(d&&d.defaultProps){h=s({},h),d=d.defaultProps;for(var v in d)h[v]===void 0&&(h[v]=d[v]);return h}return h}var Ap=Zn(null),Mp=null,vc=null,bv=null;function _v(){bv=vc=Mp=null}function RM(d,h,v){ze?(Ge(Ap,h._currentValue),h._currentValue=v):(Ge(Ap,h._currentValue2),h._currentValue2=v)}function Sv(d){var h=Ap.current;ft(Ap),ze?d._currentValue=h:d._currentValue2=h}function Av(d,h,v){for(;d!==null;){var A=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,A!==null&&(A.childLanes|=h)):A!==null&&(A.childLanes&h)!==h&&(A.childLanes|=h),d===v)break;d=d.return}}function wc(d,h){Mp=d,bv=vc=null,d=d.dependencies,d!==null&&d.firstContext!==null&&(d.lanes&h&&(dr=!0),d.firstContext=null)}function Nr(d){var h=ze?d._currentValue:d._currentValue2;if(bv!==d)if(d={context:d,memoizedValue:h,next:null},vc===null){if(Mp===null)throw Error(a(308));vc=d,Mp.dependencies={lanes:0,firstContext:d}}else vc=vc.next=d;return h}var Es=null,za=!1;function Mv(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function IM(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function ea(d,h){return{eventTime:d,lane:h,tag:0,payload:null,callback:null,next:null}}function Ba(d,h){var v=d.updateQueue;v!==null&&(v=v.shared,zn!==null&&d.mode&1&&!(Rt&2)?(d=v.interleaved,d===null?(h.next=h,Es===null?Es=[v]:Es.push(v)):(h.next=d.next,d.next=h),v.interleaved=h):(d=v.pending,d===null?h.next=h:(h.next=d.next,d.next=h),v.pending=h))}function Tp(d,h,v){if(h=h.updateQueue,h!==null&&(h=h.shared,(v&4194240)!==0)){var A=h.lanes;A&=d.pendingLanes,v|=A,h.lanes=v,gv(d,v)}}function kM(d,h){var v=d.updateQueue,A=d.alternate;if(A!==null&&(A=A.updateQueue,v===A)){var T=null,P=null;if(v=v.firstBaseUpdate,v!==null){do{var W={eventTime:v.eventTime,lane:v.lane,tag:v.tag,payload:v.payload,callback:v.callback,next:null};P===null?T=P=W:P=P.next=W,v=v.next}while(v!==null);P===null?T=P=h:P=P.next=h}else T=P=h;v={baseState:A.baseState,firstBaseUpdate:T,lastBaseUpdate:P,shared:A.shared,effects:A.effects},d.updateQueue=v;return}d=v.lastBaseUpdate,d===null?v.firstBaseUpdate=h:d.next=h,v.lastBaseUpdate=h}function Ep(d,h,v,A){var T=d.updateQueue;za=!1;var P=T.firstBaseUpdate,W=T.lastBaseUpdate,J=T.shared.pending;if(J!==null){T.shared.pending=null;var de=J,Ne=de.next;de.next=null,W===null?P=Ne:W.next=Ne,W=de;var qe=d.alternate;qe!==null&&(qe=qe.updateQueue,J=qe.lastBaseUpdate,J!==W&&(J===null?qe.firstBaseUpdate=Ne:J.next=Ne,qe.lastBaseUpdate=de))}if(P!==null){var wt=T.baseState;W=0,qe=Ne=de=null,J=P;do{var at=J.lane,Zt=J.eventTime;if((A&at)===at){qe!==null&&(qe=qe.next={eventTime:Zt,lane:0,tag:J.tag,payload:J.payload,callback:J.callback,next:null});e:{var tt=d,yi=J;switch(at=h,Zt=v,yi.tag){case 1:if(tt=yi.payload,typeof tt=="function"){wt=tt.call(Zt,wt,at);break e}wt=tt;break e;case 3:tt.flags=tt.flags&-65537|128;case 0:if(tt=yi.payload,at=typeof tt=="function"?tt.call(Zt,wt,at):tt,at==null)break e;wt=s({},wt,at);break e;case 2:za=!0}}J.callback!==null&&J.lane!==0&&(d.flags|=64,at=T.effects,at===null?T.effects=[J]:at.push(J))}else Zt={eventTime:Zt,lane:at,tag:J.tag,payload:J.payload,callback:J.callback,next:null},qe===null?(Ne=qe=Zt,de=wt):qe=qe.next=Zt,W|=at;if(J=J.next,J===null){if(J=T.shared.pending,J===null)break;at=J,J=at.next,at.next=null,T.lastBaseUpdate=at,T.shared.pending=null}}while(!0);if(qe===null&&(de=wt),T.baseState=de,T.firstBaseUpdate=Ne,T.lastBaseUpdate=qe,h=T.shared.interleaved,h!==null){T=h;do W|=T.lane,T=T.next;while(T!==h)}else P===null&&(T.shared.lanes=0);Pc|=W,d.lanes=W,d.memoizedState=wt}}function LM(d,h,v){if(d=h.effects,h.effects=null,d!==null)for(h=0;h<d.length;h++){var A=d[h],T=A.callback;if(T!==null){if(A.callback=null,A=v,typeof T!="function")throw Error(a(191,T));T.call(A)}}}var DM=new i.Component().refs;function Tv(d,h,v,A){h=d.memoizedState,v=v(A,h),v=v==null?h:s({},h,v),d.memoizedState=v,d.lanes===0&&(d.updateQueue.baseState=v)}var Cp={isMounted:function(d){return(d=d._reactInternals)?R(d)===d:!1},enqueueSetState:function(d,h,v){d=d._reactInternals;var A=Li(),T=Wa(d),P=ea(A,T);P.payload=h,v!=null&&(P.callback=v),Ba(d,P),h=Dr(d,T,A),h!==null&&Tp(h,d,T)},enqueueReplaceState:function(d,h,v){d=d._reactInternals;var A=Li(),T=Wa(d),P=ea(A,T);P.tag=1,P.payload=h,v!=null&&(P.callback=v),Ba(d,P),h=Dr(d,T,A),h!==null&&Tp(h,d,T)},enqueueForceUpdate:function(d,h){d=d._reactInternals;var v=Li(),A=Wa(d),T=ea(v,A);T.tag=2,h!=null&&(T.callback=h),Ba(d,T),h=Dr(d,A,v),h!==null&&Tp(h,d,A)}};function FM(d,h,v,A,T,P,W){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(A,P,W):h.prototype&&h.prototype.isPureReactComponent?!Sp(v,A)||!Sp(T,P):!0}function jM(d,h,v){var A=!1,T=Cr,P=h.contextType;return typeof P=="object"&&P!==null?P=Nr(P):(T=Jn(h)?_s:Nt.current,A=h.contextTypes,P=(A=A!=null)?Pr(d,T):Cr),h=new h(v,P),d.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Cp,d.stateNode=h,h._reactInternals=d,A&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=T,d.__reactInternalMemoizedMaskedChildContext=P),h}function OM(d,h,v,A){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(v,A),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(v,A),h.state!==d&&Cp.enqueueReplaceState(h,h.state,null)}function Ev(d,h,v,A){var T=d.stateNode;T.props=v,T.state=d.memoizedState,T.refs=DM,Mv(d);var P=h.contextType;typeof P=="object"&&P!==null?T.context=Nr(P):(P=Jn(h)?_s:Nt.current,T.context=Pr(d,P)),T.state=d.memoizedState,P=h.getDerivedStateFromProps,typeof P=="function"&&(Tv(d,h,P,v),T.state=d.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(h=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),h!==T.state&&Cp.enqueueReplaceState(T,T.state,null),Ep(d,v,T,A),T.state=d.memoizedState),typeof T.componentDidMount=="function"&&(d.flags|=4194308)}var bc=[],_c=0,Pp=null,Np=0,Rr=[],Ir=0,Jo=null,ta=1,na="";function el(d,h){bc[_c++]=Np,bc[_c++]=Pp,Pp=d,Np=h}function UM(d,h,v){Rr[Ir++]=ta,Rr[Ir++]=na,Rr[Ir++]=Jo,Jo=d;var A=ta;d=na;var T=32-lr(A)-1;A&=~(1<<T),v+=1;var P=32-lr(h)+T;if(30<P){var W=T-T%5;P=(A&(1<<W)-1).toString(32),A>>=W,T-=W,ta=1<<32-lr(h)+T|v<<T|A,na=P+d}else ta=1<<P|v<<T|A,na=d}function Cv(d){d.return!==null&&(el(d,1),UM(d,1,0))}function Pv(d){for(;d===Pp;)Pp=bc[--_c],bc[_c]=null,Np=bc[--_c],bc[_c]=null;for(;d===Jo;)Jo=Rr[--Ir],Rr[Ir]=null,na=Rr[--Ir],Rr[Ir]=null,ta=Rr[--Ir],Rr[Ir]=null}var cr=null,ur=null,fn=!1,Td=!1,Qr=null;function zM(d,h){var v=Fr(5,null,null,0);v.elementType="DELETED",v.stateNode=h,v.return=d,h=d.deletions,h===null?(d.deletions=[v],d.flags|=16):h.push(v)}function BM(d,h){switch(d.tag){case 5:return h=It(h,d.type,d.pendingProps),h!==null?(d.stateNode=h,cr=d,ur=gc(h),!0):!1;case 6:return h=nn(h,d.pendingProps),h!==null?(d.stateNode=h,cr=d,ur=null,!0):!1;case 13:if(h=hn(h),h!==null){var v=Jo!==null?{id:ta,overflow:na}:null;return d.memoizedState={dehydrated:h,treeContext:v,retryLane:1073741824},v=Fr(18,null,null,0),v.stateNode=h,v.return=d,d.child=v,cr=d,ur=null,!0}return!1;default:return!1}}function Nv(d){return(d.mode&1)!==0&&(d.flags&128)===0}function Rv(d){if(fn){var h=ur;if(h){var v=h;if(!BM(d,h)){if(Nv(d))throw Error(a(418));h=Ua(v);var A=cr;h&&BM(d,h)?zM(A,v):(d.flags=d.flags&-4097|2,fn=!1,cr=d)}}else{if(Nv(d))throw Error(a(418));d.flags=d.flags&-4097|2,fn=!1,cr=d}}}function VM(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;cr=d}function Ed(d){if(!_e||d!==cr)return!1;if(!fn)return VM(d),fn=!0,!1;if(d.tag!==3&&(d.tag!==5||Be(d.type)&&!ge(d.type,d.memoizedProps))){var h=ur;if(h){if(Nv(d)){for(d=ur;d;)d=Ua(d);throw Error(a(418))}for(;h;)zM(d,h),h=Ua(h)}}if(VM(d),d.tag===13){if(!_e)throw Error(a(316));if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));ur=U(d)}else ur=cr?Ua(d.stateNode):null;return!0}function Sc(){_e&&(ur=cr=null,Td=fn=!1)}function Iv(d){Qr===null?Qr=[d]:Qr.push(d)}function Cd(d,h,v){if(d=v.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(v._owner){if(v=v._owner,v){if(v.tag!==1)throw Error(a(309));var A=v.stateNode}if(!A)throw Error(a(147,d));var T=A,P=""+d;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===P?h.ref:(h=function(W){var J=T.refs;J===DM&&(J=T.refs={}),W===null?delete J[P]:J[P]=W},h._stringRef=P,h)}if(typeof d!="string")throw Error(a(284));if(!v._owner)throw Error(a(290,d))}return d}function Rp(d,h){throw d=Object.prototype.toString.call(h),Error(a(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d))}function HM(d){var h=d._init;return h(d._payload)}function WM(d){function h(ae,te){if(d){var ue=ae.deletions;ue===null?(ae.deletions=[te],ae.flags|=16):ue.push(te)}}function v(ae,te){if(!d)return null;for(;te!==null;)h(ae,te),te=te.sibling;return null}function A(ae,te){for(ae=new Map;te!==null;)te.key!==null?ae.set(te.key,te):ae.set(te.index,te),te=te.sibling;return ae}function T(ae,te){return ae=qa(ae,te),ae.index=0,ae.sibling=null,ae}function P(ae,te,ue){return ae.index=ue,d?(ue=ae.alternate,ue!==null?(ue=ue.index,ue<te?(ae.flags|=2,te):ue):(ae.flags|=2,te)):(ae.flags|=1048576,te)}function W(ae){return d&&ae.alternate===null&&(ae.flags|=2),ae}function J(ae,te,ue,Oe){return te===null||te.tag!==6?(te=m0(ue,ae.mode,Oe),te.return=ae,te):(te=T(te,ue),te.return=ae,te)}function de(ae,te,ue,Oe){var Ze=ue.type;return Ze===f?qe(ae,te,ue.props.children,Oe,ue.key):te!==null&&(te.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===S&&HM(Ze)===te.type)?(Oe=T(te,ue.props),Oe.ref=Cd(ae,te,ue),Oe.return=ae,Oe):(Oe=lm(ue.type,ue.key,ue.props,null,ae.mode,Oe),Oe.ref=Cd(ae,te,ue),Oe.return=ae,Oe)}function Ne(ae,te,ue,Oe){return te===null||te.tag!==4||te.stateNode.containerInfo!==ue.containerInfo||te.stateNode.implementation!==ue.implementation?(te=g0(ue,ae.mode,Oe),te.return=ae,te):(te=T(te,ue.children||[]),te.return=ae,te)}function qe(ae,te,ue,Oe,Ze){return te===null||te.tag!==7?(te=ol(ue,ae.mode,Oe,Ze),te.return=ae,te):(te=T(te,ue),te.return=ae,te)}function wt(ae,te,ue){if(typeof te=="string"&&te!==""||typeof te=="number")return te=m0(""+te,ae.mode,ue),te.return=ae,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case c:return ue=lm(te.type,te.key,te.props,null,ae.mode,ue),ue.ref=Cd(ae,null,te),ue.return=ae,ue;case u:return te=g0(te,ae.mode,ue),te.return=ae,te;case S:var Oe=te._init;return wt(ae,Oe(te._payload),ue)}if($(te)||C(te))return te=ol(te,ae.mode,ue,null),te.return=ae,te;Rp(ae,te)}return null}function at(ae,te,ue,Oe){var Ze=te!==null?te.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number")return Ze!==null?null:J(ae,te,""+ue,Oe);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case c:return ue.key===Ze?de(ae,te,ue,Oe):null;case u:return ue.key===Ze?Ne(ae,te,ue,Oe):null;case S:return Ze=ue._init,at(ae,te,Ze(ue._payload),Oe)}if($(ue)||C(ue))return Ze!==null?null:qe(ae,te,ue,Oe,null);Rp(ae,ue)}return null}function Zt(ae,te,ue,Oe,Ze){if(typeof Oe=="string"&&Oe!==""||typeof Oe=="number")return ae=ae.get(ue)||null,J(te,ae,""+Oe,Ze);if(typeof Oe=="object"&&Oe!==null){switch(Oe.$$typeof){case c:return ae=ae.get(Oe.key===null?ue:Oe.key)||null,de(te,ae,Oe,Ze);case u:return ae=ae.get(Oe.key===null?ue:Oe.key)||null,Ne(te,ae,Oe,Ze);case S:var Ct=Oe._init;return Zt(ae,te,ue,Ct(Oe._payload),Ze)}if($(Oe)||C(Oe))return ae=ae.get(ue)||null,qe(te,ae,Oe,Ze,null);Rp(te,Oe)}return null}function tt(ae,te,ue,Oe){for(var Ze=null,Ct=null,bt=te,Vt=te=0,ni=null;bt!==null&&Vt<ue.length;Vt++){bt.index>Vt?(ni=bt,bt=null):ni=bt.sibling;var Ht=at(ae,bt,ue[Vt],Oe);if(Ht===null){bt===null&&(bt=ni);break}d&&bt&&Ht.alternate===null&&h(ae,bt),te=P(Ht,te,Vt),Ct===null?Ze=Ht:Ct.sibling=Ht,Ct=Ht,bt=ni}if(Vt===ue.length)return v(ae,bt),fn&&el(ae,Vt),Ze;if(bt===null){for(;Vt<ue.length;Vt++)bt=wt(ae,ue[Vt],Oe),bt!==null&&(te=P(bt,te,Vt),Ct===null?Ze=bt:Ct.sibling=bt,Ct=bt);return fn&&el(ae,Vt),Ze}for(bt=A(ae,bt);Vt<ue.length;Vt++)ni=Zt(bt,ae,Vt,ue[Vt],Oe),ni!==null&&(d&&ni.alternate!==null&&bt.delete(ni.key===null?Vt:ni.key),te=P(ni,te,Vt),Ct===null?Ze=ni:Ct.sibling=ni,Ct=ni);return d&&bt.forEach(function(Xa){return h(ae,Xa)}),fn&&el(ae,Vt),Ze}function yi(ae,te,ue,Oe){var Ze=C(ue);if(typeof Ze!="function")throw Error(a(150));if(ue=Ze.call(ue),ue==null)throw Error(a(151));for(var Ct=Ze=null,bt=te,Vt=te=0,ni=null,Ht=ue.next();bt!==null&&!Ht.done;Vt++,Ht=ue.next()){bt.index>Vt?(ni=bt,bt=null):ni=bt.sibling;var Xa=at(ae,bt,Ht.value,Oe);if(Xa===null){bt===null&&(bt=ni);break}d&&bt&&Xa.alternate===null&&h(ae,bt),te=P(Xa,te,Vt),Ct===null?Ze=Xa:Ct.sibling=Xa,Ct=Xa,bt=ni}if(Ht.done)return v(ae,bt),fn&&el(ae,Vt),Ze;if(bt===null){for(;!Ht.done;Vt++,Ht=ue.next())Ht=wt(ae,Ht.value,Oe),Ht!==null&&(te=P(Ht,te,Vt),Ct===null?Ze=Ht:Ct.sibling=Ht,Ct=Ht);return fn&&el(ae,Vt),Ze}for(bt=A(ae,bt);!Ht.done;Vt++,Ht=ue.next())Ht=Zt(bt,ae,Vt,Ht.value,Oe),Ht!==null&&(d&&Ht.alternate!==null&&bt.delete(Ht.key===null?Vt:Ht.key),te=P(Ht,te,Vt),Ct===null?Ze=Ht:Ct.sibling=Ht,Ct=Ht);return d&&bt.forEach(function(G4){return h(ae,G4)}),fn&&el(ae,Vt),Ze}function jr(ae,te,ue,Oe){if(typeof ue=="object"&&ue!==null&&ue.type===f&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case c:e:{for(var Ze=ue.key,Ct=te;Ct!==null;){if(Ct.key===Ze){if(Ze=ue.type,Ze===f){if(Ct.tag===7){v(ae,Ct.sibling),te=T(Ct,ue.props.children),te.return=ae,ae=te;break e}}else if(Ct.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===S&&HM(Ze)===Ct.type){v(ae,Ct.sibling),te=T(Ct,ue.props),te.ref=Cd(ae,Ct,ue),te.return=ae,ae=te;break e}v(ae,Ct);break}else h(ae,Ct);Ct=Ct.sibling}ue.type===f?(te=ol(ue.props.children,ae.mode,Oe,ue.key),te.return=ae,ae=te):(Oe=lm(ue.type,ue.key,ue.props,null,ae.mode,Oe),Oe.ref=Cd(ae,te,ue),Oe.return=ae,ae=Oe)}return W(ae);case u:e:{for(Ct=ue.key;te!==null;){if(te.key===Ct)if(te.tag===4&&te.stateNode.containerInfo===ue.containerInfo&&te.stateNode.implementation===ue.implementation){v(ae,te.sibling),te=T(te,ue.children||[]),te.return=ae,ae=te;break e}else{v(ae,te);break}else h(ae,te);te=te.sibling}te=g0(ue,ae.mode,Oe),te.return=ae,ae=te}return W(ae);case S:return Ct=ue._init,jr(ae,te,Ct(ue._payload),Oe)}if($(ue))return tt(ae,te,ue,Oe);if(C(ue))return yi(ae,te,ue,Oe);Rp(ae,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"?(ue=""+ue,te!==null&&te.tag===6?(v(ae,te.sibling),te=T(te,ue),te.return=ae,ae=te):(v(ae,te),te=m0(ue,ae.mode,Oe),te.return=ae,ae=te),W(ae)):v(ae,te)}return jr}var Ac=WM(!0),GM=WM(!1),Pd={},kr=Zn(Pd),Nd=Zn(Pd),Mc=Zn(Pd);function Cs(d){if(d===Pd)throw Error(a(174));return d}function kv(d,h){Ge(Mc,h),Ge(Nd,d),Ge(kr,Pd),d=ee(h),ft(kr),Ge(kr,d)}function Tc(){ft(kr),ft(Nd),ft(Mc)}function qM(d){var h=Cs(Mc.current),v=Cs(kr.current);h=L(v,d.type,h),v!==h&&(Ge(Nd,d),Ge(kr,h))}function Lv(d){Nd.current===d&&(ft(kr),ft(Nd))}var xn=Zn(0);function Ip(d){for(var h=d;h!==null;){if(h.tag===13){var v=h.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||Xi(v)||Sd(v)))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if(h.flags&128)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}h.sibling.return=h.return,h=h.sibling}return null}var Dv=[];function Fv(){for(var d=0;d<Dv.length;d++){var h=Dv[d];ze?h._workInProgressVersionPrimary=null:h._workInProgressVersionSecondary=null}Dv.length=0}var kp=o.ReactCurrentDispatcher,Lr=o.ReactCurrentBatchConfig,Ec=0,An=null,mi=null,ti=null,Lp=!1,Rd=!1,Id=0,g4=0;function gi(){throw Error(a(321))}function jv(d,h){if(h===null)return!1;for(var v=0;v<h.length&&v<d.length;v++)if(!Ms(d[v],h[v]))return!1;return!0}function Ov(d,h,v,A,T,P){if(Ec=P,An=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,kp.current=d===null||d.memoizedState===null?w4:b4,d=v(A,T),Rd){P=0;do{if(Rd=!1,Id=0,25<=P)throw Error(a(301));P+=1,ti=mi=null,h.updateQueue=null,kp.current=_4,d=v(A,T)}while(Rd)}if(kp.current=Up,h=mi!==null&&mi.next!==null,Ec=0,ti=mi=An=null,Lp=!1,h)throw Error(a(300));return d}function Uv(){var d=Id!==0;return Id=0,d}function ia(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ti===null?An.memoizedState=ti=d:ti=ti.next=d,ti}function Ps(){if(mi===null){var d=An.alternate;d=d!==null?d.memoizedState:null}else d=mi.next;var h=ti===null?An.memoizedState:ti.next;if(h!==null)ti=h,mi=d;else{if(d===null)throw Error(a(310));mi=d,d={memoizedState:mi.memoizedState,baseState:mi.baseState,baseQueue:mi.baseQueue,queue:mi.queue,next:null},ti===null?An.memoizedState=ti=d:ti=ti.next=d}return ti}function tl(d,h){return typeof h=="function"?h(d):h}function Dp(d){var h=Ps(),v=h.queue;if(v===null)throw Error(a(311));v.lastRenderedReducer=d;var A=mi,T=A.baseQueue,P=v.pending;if(P!==null){if(T!==null){var W=T.next;T.next=P.next,P.next=W}A.baseQueue=T=P,v.pending=null}if(T!==null){P=T.next,A=A.baseState;var J=W=null,de=null,Ne=P;do{var qe=Ne.lane;if((Ec&qe)===qe)de!==null&&(de=de.next={lane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),A=Ne.hasEagerState?Ne.eagerState:d(A,Ne.action);else{var wt={lane:qe,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null};de===null?(J=de=wt,W=A):de=de.next=wt,An.lanes|=qe,Pc|=qe}Ne=Ne.next}while(Ne!==null&&Ne!==P);de===null?W=A:de.next=J,Ms(A,h.memoizedState)||(dr=!0),h.memoizedState=A,h.baseState=W,h.baseQueue=de,v.lastRenderedState=A}if(d=v.interleaved,d!==null){T=d;do P=T.lane,An.lanes|=P,Pc|=P,T=T.next;while(T!==d)}else T===null&&(v.lanes=0);return[h.memoizedState,v.dispatch]}function Fp(d){var h=Ps(),v=h.queue;if(v===null)throw Error(a(311));v.lastRenderedReducer=d;var A=v.dispatch,T=v.pending,P=h.memoizedState;if(T!==null){v.pending=null;var W=T=T.next;do P=d(P,W.action),W=W.next;while(W!==T);Ms(P,h.memoizedState)||(dr=!0),h.memoizedState=P,h.baseQueue===null&&(h.baseState=P),v.lastRenderedState=P}return[P,A]}function XM(){}function $M(d,h){var v=An,A=Ps(),T=h(),P=!Ms(A.memoizedState,T);if(P&&(A.memoizedState=T,dr=!0),A=A.queue,Ld(KM.bind(null,v,A,d),[d]),A.getSnapshot!==h||P||ti!==null&&ti.memoizedState.tag&1){if(v.flags|=2048,kd(9,QM.bind(null,v,A,T,h),void 0,null),zn===null)throw Error(a(349));Ec&30||YM(v,h,T)}return T}function YM(d,h,v){d.flags|=16384,d={getSnapshot:h,value:v},h=An.updateQueue,h===null?(h={lastEffect:null,stores:null},An.updateQueue=h,h.stores=[d]):(v=h.stores,v===null?h.stores=[d]:v.push(d))}function QM(d,h,v,A){h.value=v,h.getSnapshot=A,ZM(h)&&Dr(d,1,-1)}function KM(d,h,v){return v(function(){ZM(h)&&Dr(d,1,-1)})}function ZM(d){var h=d.getSnapshot;d=d.value;try{var v=h();return!Ms(d,v)}catch{return!0}}function zv(d){var h=ia();return typeof d=="function"&&(d=d()),h.memoizedState=h.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:tl,lastRenderedState:d},h.queue=d,d=d.dispatch=v4.bind(null,An,d),[h.memoizedState,d]}function kd(d,h,v,A){return d={tag:d,create:h,destroy:v,deps:A,next:null},h=An.updateQueue,h===null?(h={lastEffect:null,stores:null},An.updateQueue=h,h.lastEffect=d.next=d):(v=h.lastEffect,v===null?h.lastEffect=d.next=d:(A=v.next,v.next=d,d.next=A,h.lastEffect=d)),d}function JM(){return Ps().memoizedState}function jp(d,h,v,A){var T=ia();An.flags|=d,T.memoizedState=kd(1|h,v,void 0,A===void 0?null:A)}function Op(d,h,v,A){var T=Ps();A=A===void 0?null:A;var P=void 0;if(mi!==null){var W=mi.memoizedState;if(P=W.destroy,A!==null&&jv(A,W.deps)){T.memoizedState=kd(h,v,P,A);return}}An.flags|=d,T.memoizedState=kd(1|h,v,P,A)}function Bv(d,h){return jp(8390656,8,d,h)}function Ld(d,h){return Op(2048,8,d,h)}function eT(d,h){return Op(4,2,d,h)}function tT(d,h){return Op(4,4,d,h)}function nT(d,h){if(typeof h=="function")return d=d(),h(d),function(){h(null)};if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function iT(d,h,v){return v=v!=null?v.concat([d]):null,Op(4,4,nT.bind(null,h,d),v)}function Vv(){}function rT(d,h){var v=Ps();h=h===void 0?null:h;var A=v.memoizedState;return A!==null&&h!==null&&jv(h,A[1])?A[0]:(v.memoizedState=[d,h],d)}function sT(d,h){var v=Ps();h=h===void 0?null:h;var A=v.memoizedState;return A!==null&&h!==null&&jv(h,A[1])?A[0]:(d=d(),v.memoizedState=[d,h],d)}function x4(d,h){var v=Bt;Bt=v!==0&&4>v?v:4,d(!0);var A=Lr.transition;Lr.transition={};try{d(!1),h()}finally{Bt=v,Lr.transition=A}}function aT(){return Ps().memoizedState}function y4(d,h,v){var A=Wa(d);v={lane:A,action:v,hasEagerState:!1,eagerState:null,next:null},oT(d)?lT(h,v):(cT(d,h,v),v=Li(),d=Dr(d,A,v),d!==null&&uT(d,h,A))}function v4(d,h,v){var A=Wa(d),T={lane:A,action:v,hasEagerState:!1,eagerState:null,next:null};if(oT(d))lT(h,T);else{cT(d,h,T);var P=d.alternate;if(d.lanes===0&&(P===null||P.lanes===0)&&(P=h.lastRenderedReducer,P!==null))try{var W=h.lastRenderedState,J=P(W,v);if(T.hasEagerState=!0,T.eagerState=J,Ms(J,W))return}catch{}finally{}v=Li(),d=Dr(d,A,v),d!==null&&uT(d,h,A)}}function oT(d){var h=d.alternate;return d===An||h!==null&&h===An}function lT(d,h){Rd=Lp=!0;var v=d.pending;v===null?h.next=h:(h.next=v.next,v.next=h),d.pending=h}function cT(d,h,v){zn!==null&&d.mode&1&&!(Rt&2)?(d=h.interleaved,d===null?(v.next=v,Es===null?Es=[h]:Es.push(h)):(v.next=d.next,d.next=v),h.interleaved=v):(d=h.pending,d===null?v.next=v:(v.next=d.next,d.next=v),h.pending=v)}function uT(d,h,v){if(v&4194240){var A=h.lanes;A&=d.pendingLanes,v|=A,h.lanes=v,gv(d,v)}}var Up={readContext:Nr,useCallback:gi,useContext:gi,useEffect:gi,useImperativeHandle:gi,useInsertionEffect:gi,useLayoutEffect:gi,useMemo:gi,useReducer:gi,useRef:gi,useState:gi,useDebugValue:gi,useDeferredValue:gi,useTransition:gi,useMutableSource:gi,useSyncExternalStore:gi,useId:gi,unstable_isNewReconciler:!1},w4={readContext:Nr,useCallback:function(d,h){return ia().memoizedState=[d,h===void 0?null:h],d},useContext:Nr,useEffect:Bv,useImperativeHandle:function(d,h,v){return v=v!=null?v.concat([d]):null,jp(4194308,4,nT.bind(null,h,d),v)},useLayoutEffect:function(d,h){return jp(4194308,4,d,h)},useInsertionEffect:function(d,h){return jp(4,2,d,h)},useMemo:function(d,h){var v=ia();return h=h===void 0?null:h,d=d(),v.memoizedState=[d,h],d},useReducer:function(d,h,v){var A=ia();return h=v!==void 0?v(h):h,A.memoizedState=A.baseState=h,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:h},A.queue=d,d=d.dispatch=y4.bind(null,An,d),[A.memoizedState,d]},useRef:function(d){var h=ia();return d={current:d},h.memoizedState=d},useState:zv,useDebugValue:Vv,useDeferredValue:function(d){var h=zv(d),v=h[0],A=h[1];return Bv(function(){var T=Lr.transition;Lr.transition={};try{A(d)}finally{Lr.transition=T}},[d]),v},useTransition:function(){var d=zv(!1),h=d[0];return d=x4.bind(null,d[1]),ia().memoizedState=d,[h,d]},useMutableSource:function(){},useSyncExternalStore:function(d,h,v){var A=An,T=ia();if(fn){if(v===void 0)throw Error(a(407));v=v()}else{if(v=h(),zn===null)throw Error(a(349));Ec&30||YM(A,h,v)}T.memoizedState=v;var P={value:v,getSnapshot:h};return T.queue=P,Bv(KM.bind(null,A,P,d),[d]),A.flags|=2048,kd(9,QM.bind(null,A,P,v,h),void 0,null),v},useId:function(){var d=ia(),h=zn.identifierPrefix;if(fn){var v=na,A=ta;v=(A&~(1<<32-lr(A)-1)).toString(32)+v,h=":"+h+"R"+v,v=Id++,0<v&&(h+="H"+v.toString(32)),h+=":"}else v=g4++,h=":"+h+"r"+v.toString(32)+":";return d.memoizedState=h},unstable_isNewReconciler:!1},b4={readContext:Nr,useCallback:rT,useContext:Nr,useEffect:Ld,useImperativeHandle:iT,useInsertionEffect:eT,useLayoutEffect:tT,useMemo:sT,useReducer:Dp,useRef:JM,useState:function(){return Dp(tl)},useDebugValue:Vv,useDeferredValue:function(d){var h=Dp(tl),v=h[0],A=h[1];return Ld(function(){var T=Lr.transition;Lr.transition={};try{A(d)}finally{Lr.transition=T}},[d]),v},useTransition:function(){var d=Dp(tl)[0],h=Ps().memoizedState;return[d,h]},useMutableSource:XM,useSyncExternalStore:$M,useId:aT,unstable_isNewReconciler:!1},_4={readContext:Nr,useCallback:rT,useContext:Nr,useEffect:Ld,useImperativeHandle:iT,useInsertionEffect:eT,useLayoutEffect:tT,useMemo:sT,useReducer:Fp,useRef:JM,useState:function(){return Fp(tl)},useDebugValue:Vv,useDeferredValue:function(d){var h=Fp(tl),v=h[0],A=h[1];return Ld(function(){var T=Lr.transition;Lr.transition={};try{A(d)}finally{Lr.transition=T}},[d]),v},useTransition:function(){var d=Fp(tl)[0],h=Ps().memoizedState;return[d,h]},useMutableSource:XM,useSyncExternalStore:$M,useId:aT,unstable_isNewReconciler:!1};function Hv(d,h){try{var v="",A=h;do v+=m4(A),A=A.return;while(A);var T=v}catch(P){T=`
Error generating stack: `+P.message+`
`+P.stack}return{value:d,source:h,stack:T}}function Wv(d,h){try{console.error(h.value)}catch(v){setTimeout(function(){throw v})}}var S4=typeof WeakMap=="function"?WeakMap:Map;function dT(d,h,v){v=ea(-1,v),v.tag=3,v.payload={element:null};var A=h.value;return v.callback=function(){tm||(tm=!0,l0=A),Wv(d,h)},v}function hT(d,h,v){v=ea(-1,v),v.tag=3;var A=d.type.getDerivedStateFromError;if(typeof A=="function"){var T=h.value;v.payload=function(){return A(T)},v.callback=function(){Wv(d,h)}}var P=d.stateNode;return P!==null&&typeof P.componentDidCatch=="function"&&(v.callback=function(){Wv(d,h),typeof A!="function"&&(Va===null?Va=new Set([this]):Va.add(this));var W=h.stack;this.componentDidCatch(h.value,{componentStack:W!==null?W:""})}),v}function fT(d,h,v){var A=d.pingCache;if(A===null){A=d.pingCache=new S4;var T=new Set;A.set(h,T)}else T=A.get(h),T===void 0&&(T=new Set,A.set(h,T));T.has(v)||(T.add(v),d=j4.bind(null,d,h,v),h.then(d,d))}function pT(d){do{var h;if((h=d.tag===13)&&(h=d.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return d;d=d.return}while(d!==null);return null}function mT(d,h,v,A,T){return d.mode&1?(d.flags|=65536,d.lanes=T,d):(d===h?d.flags|=65536:(d.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(h=ea(-1,1),h.tag=2,Ba(v,h))),v.lanes|=1),d)}function Ns(d){d.flags|=4}function gT(d,h){if(d!==null&&d.child===h.child)return!0;if(h.flags&16)return!1;for(d=h.child;d!==null;){if(d.flags&12854||d.subtreeFlags&12854)return!1;d=d.sibling}return!0}var Dd,Fd,zp,Bp;if(Xe)Dd=function(d,h){for(var v=h.child;v!==null;){if(v.tag===5||v.tag===6)Z(d,v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===h)break;for(;v.sibling===null;){if(v.return===null||v.return===h)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},Fd=function(){},zp=function(d,h,v,A,T){if(d=d.memoizedProps,d!==A){var P=h.stateNode,W=Cs(kr.current);v=se(P,v,d,A,T,W),(h.updateQueue=v)&&Ns(h)}},Bp=function(d,h,v,A){v!==A&&Ns(h)};else if(q){Dd=function(d,h,v,A){for(var T=h.child;T!==null;){if(T.tag===5){var P=T.stateNode;v&&A&&(P=Ot(P,T.type,T.memoizedProps,T)),Z(d,P)}else if(T.tag===6)P=T.stateNode,v&&A&&(P=Xt(P,T.memoizedProps,T)),Z(d,P);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)P=T.child,P!==null&&(P.return=T),Dd(d,T,!0,!0);else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===h)break;for(;T.sibling===null;){if(T.return===null||T.return===h)return;T=T.return}T.sibling.return=T.return,T=T.sibling}};var xT=function(d,h,v,A){for(var T=h.child;T!==null;){if(T.tag===5){var P=T.stateNode;v&&A&&(P=Ot(P,T.type,T.memoizedProps,T)),Me(d,P)}else if(T.tag===6)P=T.stateNode,v&&A&&(P=Xt(P,T.memoizedProps,T)),Me(d,P);else if(T.tag!==4){if(T.tag===22&&T.memoizedState!==null)P=T.child,P!==null&&(P.return=T),xT(d,T,!0,!0);else if(T.child!==null){T.child.return=T,T=T.child;continue}}if(T===h)break;for(;T.sibling===null;){if(T.return===null||T.return===h)return;T=T.return}T.sibling.return=T.return,T=T.sibling}};Fd=function(d,h){var v=h.stateNode;if(!gT(d,h)){d=v.containerInfo;var A=ot(d);xT(A,h,!1,!1),v.pendingChildren=A,Ns(h),Je(d,A)}},zp=function(d,h,v,A,T){var P=d.stateNode,W=d.memoizedProps;if((d=gT(d,h))&&W===A)h.stateNode=P;else{var J=h.stateNode,de=Cs(kr.current),Ne=null;W!==A&&(Ne=se(J,v,W,A,T,de)),d&&Ne===null?h.stateNode=P:(P=Ie(P,Ne,v,W,A,h,d,J),K(P,v,A,T,de)&&Ns(h),h.stateNode=P,d?Ns(h):Dd(P,h,!1,!1))}},Bp=function(d,h,v,A){v!==A?(d=Cs(Mc.current),v=Cs(kr.current),h.stateNode=Ce(A,d,v,h),Ns(h)):h.stateNode=d.stateNode}}else Fd=function(){},zp=function(){},Bp=function(){};function jd(d,h){if(!fn)switch(d.tailMode){case"hidden":h=d.tail;for(var v=null;h!==null;)h.alternate!==null&&(v=h),h=h.sibling;v===null?d.tail=null:v.sibling=null;break;case"collapsed":v=d.tail;for(var A=null;v!==null;)v.alternate!==null&&(A=v),v=v.sibling;A===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:A.sibling=null}}function xi(d){var h=d.alternate!==null&&d.alternate.child===d.child,v=0,A=0;if(h)for(var T=d.child;T!==null;)v|=T.lanes|T.childLanes,A|=T.subtreeFlags&14680064,A|=T.flags&14680064,T.return=d,T=T.sibling;else for(T=d.child;T!==null;)v|=T.lanes|T.childLanes,A|=T.subtreeFlags,A|=T.flags,T.return=d,T=T.sibling;return d.subtreeFlags|=A,d.childLanes=v,h}function A4(d,h,v){var A=h.pendingProps;switch(Pv(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xi(h),null;case 1:return Jn(h.type)&&Nn(),xi(h),null;case 3:return A=h.stateNode,Tc(),ft(Sn),ft(Nt),Fv(),A.pendingContext&&(A.context=A.pendingContext,A.pendingContext=null),(d===null||d.child===null)&&(Ed(h)?Ns(h):d===null||d.memoizedState.isDehydrated&&!(h.flags&256)||(h.flags|=1024,Qr!==null&&(d0(Qr),Qr=null))),Fd(d,h),xi(h),null;case 5:Lv(h),v=Cs(Mc.current);var T=h.type;if(d!==null&&h.stateNode!=null)zp(d,h,T,A,v),d.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!A){if(h.stateNode===null)throw Error(a(166));return xi(h),null}if(d=Cs(kr.current),Ed(h)){if(!_e)throw Error(a(175));d=dv(h.stateNode,h.type,h.memoizedProps,v,d,h,!Td),h.updateQueue=d,d!==null&&Ns(h)}else{var P=Y(T,A,v,d,h);Dd(P,h,!1,!1),h.stateNode=P,K(P,T,A,v,d)&&Ns(h)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return xi(h),null;case 6:if(d&&h.stateNode!=null)Bp(d,h,d.memoizedProps,A);else{if(typeof A!="string"&&h.stateNode===null)throw Error(a(166));if(d=Cs(Mc.current),v=Cs(kr.current),Ed(h)){if(!_e)throw Error(a(176));if(d=h.stateNode,A=h.memoizedProps,(v=hv(d,A,h,!Td))&&(T=cr,T!==null))switch(P=(T.mode&1)!==0,T.tag){case 3:et(T.stateNode.containerInfo,d,A,P);break;case 5:lt(T.type,T.memoizedProps,T.stateNode,d,A,P)}v&&Ns(h)}else h.stateNode=Ce(A,d,v,h)}return xi(h),null;case 13:if(ft(xn),A=h.memoizedState,fn&&ur!==null&&h.mode&1&&!(h.flags&128)){for(d=ur;d;)d=Ua(d);return Sc(),h.flags|=98560,h}if(A!==null&&A.dehydrated!==null){if(A=Ed(h),d===null){if(!A)throw Error(a(318));if(!_e)throw Error(a(344));if(d=h.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(a(317));fv(d,h)}else Sc(),!(h.flags&128)&&(h.memoizedState=null),h.flags|=4;return xi(h),null}return Qr!==null&&(d0(Qr),Qr=null),h.flags&128?(h.lanes=v,h):(A=A!==null,v=!1,d===null?Ed(h):v=d.memoizedState!==null,A&&!v&&(h.child.flags|=8192,h.mode&1&&(d===null||xn.current&1?Wn===0&&(Wn=3):f0())),h.updateQueue!==null&&(h.flags|=4),xi(h),null);case 4:return Tc(),Fd(d,h),d===null&&Te(h.stateNode.containerInfo),xi(h),null;case 10:return Sv(h.type._context),xi(h),null;case 17:return Jn(h.type)&&Nn(),xi(h),null;case 19:if(ft(xn),T=h.memoizedState,T===null)return xi(h),null;if(A=(h.flags&128)!==0,P=T.rendering,P===null)if(A)jd(T,!1);else{if(Wn!==0||d!==null&&d.flags&128)for(d=h.child;d!==null;){if(P=Ip(d),P!==null){for(h.flags|=128,jd(T,!1),d=P.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),h.subtreeFlags=0,d=v,A=h.child;A!==null;)v=A,T=d,v.flags&=14680066,P=v.alternate,P===null?(v.childLanes=0,v.lanes=T,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=P.childLanes,v.lanes=P.lanes,v.child=P.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=P.memoizedProps,v.memoizedState=P.memoizedState,v.updateQueue=P.updateQueue,v.type=P.type,T=P.dependencies,v.dependencies=T===null?null:{lanes:T.lanes,firstContext:T.firstContext}),A=A.sibling;return Ge(xn,xn.current&1|2),h.child}d=d.sibling}T.tail!==null&&ei()>o0&&(h.flags|=128,A=!0,jd(T,!1),h.lanes=4194304)}else{if(!A)if(d=Ip(P),d!==null){if(h.flags|=128,A=!0,d=d.updateQueue,d!==null&&(h.updateQueue=d,h.flags|=4),jd(T,!0),T.tail===null&&T.tailMode==="hidden"&&!P.alternate&&!fn)return xi(h),null}else 2*ei()-T.renderingStartTime>o0&&v!==1073741824&&(h.flags|=128,A=!0,jd(T,!1),h.lanes=4194304);T.isBackwards?(P.sibling=h.child,h.child=P):(d=T.last,d!==null?d.sibling=P:h.child=P,T.last=P)}return T.tail!==null?(h=T.tail,T.rendering=h,T.tail=h.sibling,T.renderingStartTime=ei(),h.sibling=null,d=xn.current,Ge(xn,A?d&1|2:d&1),h):(xi(h),null);case 22:case 23:return h0(),A=h.memoizedState!==null,d!==null&&d.memoizedState!==null!==A&&(h.flags|=8192),A&&h.mode&1?hr&1073741824&&(xi(h),Xe&&h.subtreeFlags&6&&(h.flags|=8192)):xi(h),null;case 24:return null;case 25:return null}throw Error(a(156,h.tag))}var M4=o.ReactCurrentOwner,dr=!1;function ki(d,h,v,A){h.child=d===null?GM(h,null,v,A):Ac(h,d.child,v,A)}function yT(d,h,v,A,T){v=v.render;var P=h.ref;return wc(h,T),A=Ov(d,h,v,A,P,T),v=Uv(),d!==null&&!dr?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~T,ra(d,h,T)):(fn&&v&&Cv(h),h.flags|=1,ki(d,h,A,T),h.child)}function vT(d,h,v,A,T){if(d===null){var P=v.type;return typeof P=="function"&&!p0(P)&&P.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(h.tag=15,h.type=P,wT(d,h,P,A,T)):(d=lm(v.type,null,A,h,h.mode,T),d.ref=h.ref,d.return=h,h.child=d)}if(P=d.child,!(d.lanes&T)){var W=P.memoizedProps;if(v=v.compare,v=v!==null?v:Sp,v(W,A)&&d.ref===h.ref)return ra(d,h,T)}return h.flags|=1,d=qa(P,A),d.ref=h.ref,d.return=h,h.child=d}function wT(d,h,v,A,T){if(d!==null&&Sp(d.memoizedProps,A)&&d.ref===h.ref)if(dr=!1,(d.lanes&T)!==0)d.flags&131072&&(dr=!0);else return h.lanes=d.lanes,ra(d,h,T);return Gv(d,h,v,A,T)}function bT(d,h,v){var A=h.pendingProps,T=A.children,P=d!==null?d.memoizedState:null;if(A.mode==="hidden")if(!(h.mode&1))h.memoizedState={baseLanes:0,cachePool:null},Ge(Cc,hr),hr|=v;else if(v&1073741824)h.memoizedState={baseLanes:0,cachePool:null},A=P!==null?P.baseLanes:v,Ge(Cc,hr),hr|=A;else return d=P!==null?P.baseLanes|v:v,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:d,cachePool:null},h.updateQueue=null,Ge(Cc,hr),hr|=d,null;else P!==null?(A=P.baseLanes|v,h.memoizedState=null):A=v,Ge(Cc,hr),hr|=A;return ki(d,h,T,v),h.child}function _T(d,h){var v=h.ref;(d===null&&v!==null||d!==null&&d.ref!==v)&&(h.flags|=512,h.flags|=2097152)}function Gv(d,h,v,A,T){var P=Jn(v)?_s:Nt.current;return P=Pr(h,P),wc(h,T),v=Ov(d,h,v,A,P,T),A=Uv(),d!==null&&!dr?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~T,ra(d,h,T)):(fn&&A&&Cv(h),h.flags|=1,ki(d,h,v,T),h.child)}function ST(d,h,v,A,T){if(Jn(v)){var P=!0;ci(h)}else P=!1;if(wc(h,T),h.stateNode===null)d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),jM(h,v,A),Ev(h,v,A,T),A=!0;else if(d===null){var W=h.stateNode,J=h.memoizedProps;W.props=J;var de=W.context,Ne=v.contextType;typeof Ne=="object"&&Ne!==null?Ne=Nr(Ne):(Ne=Jn(v)?_s:Nt.current,Ne=Pr(h,Ne));var qe=v.getDerivedStateFromProps,wt=typeof qe=="function"||typeof W.getSnapshotBeforeUpdate=="function";wt||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(J!==A||de!==Ne)&&OM(h,W,A,Ne),za=!1;var at=h.memoizedState;W.state=at,Ep(h,A,W,T),de=h.memoizedState,J!==A||at!==de||Sn.current||za?(typeof qe=="function"&&(Tv(h,v,qe,A),de=h.memoizedState),(J=za||FM(h,v,J,A,at,de,Ne))?(wt||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount()),typeof W.componentDidMount=="function"&&(h.flags|=4194308)):(typeof W.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=A,h.memoizedState=de),W.props=A,W.state=de,W.context=Ne,A=J):(typeof W.componentDidMount=="function"&&(h.flags|=4194308),A=!1)}else{W=h.stateNode,IM(d,h),J=h.memoizedProps,Ne=h.type===h.elementType?J:Yr(h.type,J),W.props=Ne,wt=h.pendingProps,at=W.context,de=v.contextType,typeof de=="object"&&de!==null?de=Nr(de):(de=Jn(v)?_s:Nt.current,de=Pr(h,de));var Zt=v.getDerivedStateFromProps;(qe=typeof Zt=="function"||typeof W.getSnapshotBeforeUpdate=="function")||typeof W.UNSAFE_componentWillReceiveProps!="function"&&typeof W.componentWillReceiveProps!="function"||(J!==wt||at!==de)&&OM(h,W,A,de),za=!1,at=h.memoizedState,W.state=at,Ep(h,A,W,T);var tt=h.memoizedState;J!==wt||at!==tt||Sn.current||za?(typeof Zt=="function"&&(Tv(h,v,Zt,A),tt=h.memoizedState),(Ne=za||FM(h,v,Ne,A,at,tt,de)||!1)?(qe||typeof W.UNSAFE_componentWillUpdate!="function"&&typeof W.componentWillUpdate!="function"||(typeof W.componentWillUpdate=="function"&&W.componentWillUpdate(A,tt,de),typeof W.UNSAFE_componentWillUpdate=="function"&&W.UNSAFE_componentWillUpdate(A,tt,de)),typeof W.componentDidUpdate=="function"&&(h.flags|=4),typeof W.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof W.componentDidUpdate!="function"||J===d.memoizedProps&&at===d.memoizedState||(h.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||J===d.memoizedProps&&at===d.memoizedState||(h.flags|=1024),h.memoizedProps=A,h.memoizedState=tt),W.props=A,W.state=tt,W.context=de,A=Ne):(typeof W.componentDidUpdate!="function"||J===d.memoizedProps&&at===d.memoizedState||(h.flags|=4),typeof W.getSnapshotBeforeUpdate!="function"||J===d.memoizedProps&&at===d.memoizedState||(h.flags|=1024),A=!1)}return qv(d,h,v,A,P,T)}function qv(d,h,v,A,T,P){_T(d,h);var W=(h.flags&128)!==0;if(!A&&!W)return T&&yc(h,v,!1),ra(d,h,P);A=h.stateNode,M4.current=h;var J=W&&typeof v.getDerivedStateFromError!="function"?null:A.render();return h.flags|=1,d!==null&&W?(h.child=Ac(h,d.child,null,P),h.child=Ac(h,null,J,P)):ki(d,h,J,P),h.memoizedState=A.state,T&&yc(h,v,!0),h.child}function AT(d){var h=d.stateNode;h.pendingContext?Ss(d,h.pendingContext,h.pendingContext!==h.context):h.context&&Ss(d,h.context,!1),kv(d,h.containerInfo)}function MT(d,h,v,A,T){return Sc(),Iv(T),h.flags|=256,ki(d,h,v,A),h.child}var Vp={dehydrated:null,treeContext:null,retryLane:0};function Hp(d){return{baseLanes:d,cachePool:null}}function TT(d,h,v){var A=h.pendingProps,T=xn.current,P=!1,W=(h.flags&128)!==0,J;if((J=W)||(J=d!==null&&d.memoizedState===null?!1:(T&2)!==0),J?(P=!0,h.flags&=-129):(d===null||d.memoizedState!==null)&&(T|=1),Ge(xn,T&1),d===null)return Rv(h),d=h.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?(h.mode&1?Sd(d)?h.lanes=8:h.lanes=1073741824:h.lanes=1,null):(T=A.children,d=A.fallback,P?(A=h.mode,P=h.child,T={mode:"hidden",children:T},!(A&1)&&P!==null?(P.childLanes=0,P.pendingProps=T):P=cm(T,A,0,null),d=ol(d,A,v,null),P.return=h,d.return=h,P.sibling=d,h.child=P,h.child.memoizedState=Hp(v),h.memoizedState=Vp,d):Xv(h,T));if(T=d.memoizedState,T!==null){if(J=T.dehydrated,J!==null){if(W)return h.flags&256?(h.flags&=-257,Wp(d,h,v,Error(a(422)))):h.memoizedState!==null?(h.child=d.child,h.flags|=128,null):(P=A.fallback,T=h.mode,A=cm({mode:"visible",children:A.children},T,0,null),P=ol(P,T,v,null),P.flags|=2,A.return=h,P.return=h,A.sibling=P,h.child=A,h.mode&1&&Ac(h,d.child,null,v),h.child.memoizedState=Hp(v),h.memoizedState=Vp,P);if(!(h.mode&1))h=Wp(d,h,v,null);else if(Sd(J))h=Wp(d,h,v,Error(a(419)));else if(A=(v&d.childLanes)!==0,dr||A){if(A=zn,A!==null){switch(v&-v){case 4:P=2;break;case 16:P=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:P=32;break;case 536870912:P=268435456;break;default:P=0}A=P&(A.suspendedLanes|v)?0:P,A!==0&&A!==T.retryLane&&(T.retryLane=A,Dr(d,A,-1))}f0(),h=Wp(d,h,v,Error(a(421)))}else Xi(J)?(h.flags|=128,h.child=d.child,h=O4.bind(null,d),mc(J,h),h=null):(v=T.treeContext,_e&&(ur=gp(J),cr=h,fn=!0,Qr=null,Td=!1,v!==null&&(Rr[Ir++]=ta,Rr[Ir++]=na,Rr[Ir++]=Jo,ta=v.id,na=v.overflow,Jo=h)),h=Xv(h,h.pendingProps.children),h.flags|=4096);return h}return P?(A=CT(d,h,A.children,A.fallback,v),P=h.child,T=d.child.memoizedState,P.memoizedState=T===null?Hp(v):{baseLanes:T.baseLanes|v,cachePool:null},P.childLanes=d.childLanes&~v,h.memoizedState=Vp,A):(v=ET(d,h,A.children,v),h.memoizedState=null,v)}return P?(A=CT(d,h,A.children,A.fallback,v),P=h.child,T=d.child.memoizedState,P.memoizedState=T===null?Hp(v):{baseLanes:T.baseLanes|v,cachePool:null},P.childLanes=d.childLanes&~v,h.memoizedState=Vp,A):(v=ET(d,h,A.children,v),h.memoizedState=null,v)}function Xv(d,h){return h=cm({mode:"visible",children:h},d.mode,0,null),h.return=d,d.child=h}function ET(d,h,v,A){var T=d.child;return d=T.sibling,v=qa(T,{mode:"visible",children:v}),!(h.mode&1)&&(v.lanes=A),v.return=h,v.sibling=null,d!==null&&(A=h.deletions,A===null?(h.deletions=[d],h.flags|=16):A.push(d)),h.child=v}function CT(d,h,v,A,T){var P=h.mode;d=d.child;var W=d.sibling,J={mode:"hidden",children:v};return!(P&1)&&h.child!==d?(v=h.child,v.childLanes=0,v.pendingProps=J,h.deletions=null):(v=qa(d,J),v.subtreeFlags=d.subtreeFlags&14680064),W!==null?A=qa(W,A):(A=ol(A,P,T,null),A.flags|=2),A.return=h,v.return=h,v.sibling=A,h.child=v,A}function Wp(d,h,v,A){return A!==null&&Iv(A),Ac(h,d.child,null,v),d=Xv(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function PT(d,h,v){d.lanes|=h;var A=d.alternate;A!==null&&(A.lanes|=h),Av(d.return,h,v)}function $v(d,h,v,A,T){var P=d.memoizedState;P===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:A,tail:v,tailMode:T}:(P.isBackwards=h,P.rendering=null,P.renderingStartTime=0,P.last=A,P.tail=v,P.tailMode=T)}function NT(d,h,v){var A=h.pendingProps,T=A.revealOrder,P=A.tail;if(ki(d,h,A.children,v),A=xn.current,A&2)A=A&1|2,h.flags|=128;else{if(d!==null&&d.flags&128)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&PT(d,v,h);else if(d.tag===19)PT(d,v,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}A&=1}if(Ge(xn,A),!(h.mode&1))h.memoizedState=null;else switch(T){case"forwards":for(v=h.child,T=null;v!==null;)d=v.alternate,d!==null&&Ip(d)===null&&(T=v),v=v.sibling;v=T,v===null?(T=h.child,h.child=null):(T=v.sibling,v.sibling=null),$v(h,!1,T,v,P);break;case"backwards":for(v=null,T=h.child,h.child=null;T!==null;){if(d=T.alternate,d!==null&&Ip(d)===null){h.child=T;break}d=T.sibling,T.sibling=v,v=T,T=d}$v(h,!0,v,null,P);break;case"together":$v(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function ra(d,h,v){if(d!==null&&(h.dependencies=d.dependencies),Pc|=h.lanes,!(v&h.childLanes))return null;if(d!==null&&h.child!==d.child)throw Error(a(153));if(h.child!==null){for(d=h.child,v=qa(d,d.pendingProps),h.child=v,v.return=h;d.sibling!==null;)d=d.sibling,v=v.sibling=qa(d,d.pendingProps),v.return=h;v.sibling=null}return h.child}function T4(d,h,v){switch(h.tag){case 3:AT(h),Sc();break;case 5:qM(h);break;case 1:Jn(h.type)&&ci(h);break;case 4:kv(h,h.stateNode.containerInfo);break;case 10:RM(h,h.type._context,h.memoizedProps.value);break;case 13:var A=h.memoizedState;if(A!==null)return A.dehydrated!==null?(Ge(xn,xn.current&1),h.flags|=128,null):v&h.child.childLanes?TT(d,h,v):(Ge(xn,xn.current&1),d=ra(d,h,v),d!==null?d.sibling:null);Ge(xn,xn.current&1);break;case 19:if(A=(v&h.childLanes)!==0,d.flags&128){if(A)return NT(d,h,v);h.flags|=128}var T=h.memoizedState;if(T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),Ge(xn,xn.current),A)break;return null;case 22:case 23:return h.lanes=0,bT(d,h,v)}return ra(d,h,v)}function E4(d,h){switch(Pv(h),h.tag){case 1:return Jn(h.type)&&Nn(),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return Tc(),ft(Sn),ft(Nt),Fv(),d=h.flags,d&65536&&!(d&128)?(h.flags=d&-65537|128,h):null;case 5:return Lv(h),null;case 13:if(ft(xn),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(a(340));Sc()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return ft(xn),null;case 4:return Tc(),null;case 10:return Sv(h.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var Gp=!1,nl=!1,C4=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function qp(d,h){var v=d.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(A){Qi(d,h,A)}else v.current=null}function Yv(d,h,v){try{v()}catch(A){Qi(d,h,A)}}var RT=!1;function P4(d,h){for(j(d.containerInfo),Fe=h;Fe!==null;)if(d=Fe,h=d.child,(d.subtreeFlags&1028)!==0&&h!==null)h.return=d,Fe=h;else for(;Fe!==null;){d=Fe;try{var v=d.alternate;if(d.flags&1024)switch(d.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var A=v.memoizedProps,T=v.memoizedState,P=d.stateNode,W=P.getSnapshotBeforeUpdate(d.elementType===d.type?A:Yr(d.type,A),T);P.__reactInternalSnapshotBeforeUpdate=W}break;case 3:Xe&&Le(d.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(J){Qi(d,d.return,J)}if(h=d.sibling,h!==null){h.return=d.return,Fe=h;break}Fe=d.return}return v=RT,RT=!1,v}function il(d,h,v){var A=h.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var T=A=A.next;do{if((T.tag&d)===d){var P=T.destroy;T.destroy=void 0,P!==void 0&&Yv(h,v,P)}T=T.next}while(T!==A)}}function Od(d,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var v=h=h.next;do{if((v.tag&d)===d){var A=v.create;v.destroy=A()}v=v.next}while(v!==h)}}function Qv(d){var h=d.ref;if(h!==null){var v=d.stateNode;switch(d.tag){case 5:d=X(v);break;default:d=v}typeof h=="function"?h(d):h.current=d}}function IT(d,h,v){if(As&&typeof As.onCommitFiberUnmount=="function")try{As.onCommitFiberUnmount(bp,h)}catch{}switch(h.tag){case 0:case 11:case 14:case 15:if(d=h.updateQueue,d!==null&&(d=d.lastEffect,d!==null)){var A=d=d.next;do{var T=A,P=T.destroy;T=T.tag,P!==void 0&&(T&2||T&4)&&Yv(h,v,P),A=A.next}while(A!==d)}break;case 1:if(qp(h,v),d=h.stateNode,typeof d.componentWillUnmount=="function")try{d.props=h.memoizedProps,d.state=h.memoizedState,d.componentWillUnmount()}catch(W){Qi(h,v,W)}break;case 5:qp(h,v);break;case 4:Xe?OT(d,h,v):q&&q&&(h=h.stateNode.containerInfo,v=ot(h),rt(h,v))}}function kT(d,h,v){for(var A=h;;)if(IT(d,A,v),A.child===null||Xe&&A.tag===4){if(A===h)break;for(;A.sibling===null;){if(A.return===null||A.return===h)return;A=A.return}A.sibling.return=A.return,A=A.sibling}else A.child.return=A,A=A.child}function LT(d){var h=d.alternate;h!==null&&(d.alternate=null,LT(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&Qe(h)),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function DT(d){return d.tag===5||d.tag===3||d.tag===4}function FT(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||DT(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function jT(d){if(Xe){e:{for(var h=d.return;h!==null;){if(DT(h))break e;h=h.return}throw Error(a(160))}var v=h;switch(v.tag){case 5:h=v.stateNode,v.flags&32&&(jt(h),v.flags&=-33),v=FT(d),Zv(d,v,h);break;case 3:case 4:h=v.stateNode.containerInfo,v=FT(d),Kv(d,v,h);break;default:throw Error(a(161))}}}function Kv(d,h,v){var A=d.tag;if(A===5||A===6)d=d.stateNode,h?Ke(v,d,h):gt(v,d);else if(A!==4&&(d=d.child,d!==null))for(Kv(d,h,v),d=d.sibling;d!==null;)Kv(d,h,v),d=d.sibling}function Zv(d,h,v){var A=d.tag;if(A===5||A===6)d=d.stateNode,h?ut(v,d,h):st(v,d);else if(A!==4&&(d=d.child,d!==null))for(Zv(d,h,v),d=d.sibling;d!==null;)Zv(d,h,v),d=d.sibling}function OT(d,h,v){for(var A=h,T=!1,P,W;;){if(!T){T=A.return;e:for(;;){if(T===null)throw Error(a(160));switch(P=T.stateNode,T.tag){case 5:W=!1;break e;case 3:P=P.containerInfo,W=!0;break e;case 4:P=P.containerInfo,W=!0;break e}T=T.return}T=!0}if(A.tag===5||A.tag===6)kT(d,A,v),W?dt(P,A.stateNode):Ve(P,A.stateNode);else if(A.tag===18)W?oe(P,A.stateNode):ce(P,A.stateNode);else if(A.tag===4){if(A.child!==null){P=A.stateNode.containerInfo,W=!0,A.child.return=A,A=A.child;continue}}else if(IT(d,A,v),A.child!==null){A.child.return=A,A=A.child;continue}if(A===h)break;for(;A.sibling===null;){if(A.return===null||A.return===h)return;A=A.return,A.tag===4&&(T=!1)}A.sibling.return=A.return,A=A.sibling}}function Jv(d,h){if(Xe){switch(h.tag){case 0:case 11:case 14:case 15:il(3,h,h.return),Od(3,h),il(5,h,h.return);return;case 1:return;case 5:var v=h.stateNode;if(v!=null){var A=h.memoizedProps;d=d!==null?d.memoizedProps:A;var T=h.type,P=h.updateQueue;h.updateQueue=null,P!==null&&St(v,P,T,d,A,h)}return;case 6:if(h.stateNode===null)throw Error(a(162));v=h.memoizedProps,be(h.stateNode,d!==null?d.memoizedProps:v,v);return;case 3:_e&&d!==null&&d.memoizedState.isDehydrated&&re(h.stateNode.containerInfo);return;case 12:return;case 13:Xp(h);return;case 19:Xp(h);return;case 17:return}throw Error(a(163))}switch(h.tag){case 0:case 11:case 14:case 15:il(3,h,h.return),Od(3,h),il(5,h,h.return);return;case 12:return;case 13:Xp(h);return;case 19:Xp(h);return;case 3:_e&&d!==null&&d.memoizedState.isDehydrated&&re(h.stateNode.containerInfo);break;case 22:case 23:return}e:if(q){switch(h.tag){case 1:case 5:case 6:break e;case 3:case 4:h=h.stateNode,rt(h.containerInfo,h.pendingChildren);break e}throw Error(a(163))}}function Xp(d){var h=d.updateQueue;if(h!==null){d.updateQueue=null;var v=d.stateNode;v===null&&(v=d.stateNode=new C4),h.forEach(function(A){var T=U4.bind(null,d,A);v.has(A)||(v.add(A),A.then(T,T))})}}function N4(d,h){for(Fe=h;Fe!==null;){h=Fe;var v=h.deletions;if(v!==null)for(var A=0;A<v.length;A++){var T=v[A];try{var P=d;Xe?OT(P,T,h):kT(P,T,h);var W=T.alternate;W!==null&&(W.return=null),T.return=null}catch(Ze){Qi(T,h,Ze)}}if(v=h.child,h.subtreeFlags&12854&&v!==null)v.return=h,Fe=v;else for(;Fe!==null;){h=Fe;try{var J=h.flags;if(J&32&&Xe&&jt(h.stateNode),J&512){var de=h.alternate;if(de!==null){var Ne=de.ref;Ne!==null&&(typeof Ne=="function"?Ne(null):Ne.current=null)}}if(J&8192)switch(h.tag){case 13:if(h.memoizedState!==null){var qe=h.alternate;(qe===null||qe.memoizedState===null)&&(a0=ei())}break;case 22:var wt=h.memoizedState!==null,at=h.alternate,Zt=at!==null&&at.memoizedState!==null;if(v=h,Xe){e:if(A=v,T=wt,P=null,Xe)for(var tt=A;;){if(tt.tag===5){if(P===null){P=tt;var yi=tt.stateNode;T?Jt(yi):Re(tt.stateNode,tt.memoizedProps)}}else if(tt.tag===6){if(P===null){var jr=tt.stateNode;T?vt(jr):Q(jr,tt.memoizedProps)}}else if((tt.tag!==22&&tt.tag!==23||tt.memoizedState===null||tt===A)&&tt.child!==null){tt.child.return=tt,tt=tt.child;continue}if(tt===A)break;for(;tt.sibling===null;){if(tt.return===null||tt.return===A)break e;P===tt&&(P=null),tt=tt.return}P===tt&&(P=null),tt.sibling.return=tt.return,tt=tt.sibling}}if(wt&&!Zt&&v.mode&1){Fe=v;for(var ae=v.child;ae!==null;){for(v=Fe=ae;Fe!==null;){A=Fe;var te=A.child;switch(A.tag){case 0:case 11:case 14:case 15:il(4,A,A.return);break;case 1:qp(A,A.return);var ue=A.stateNode;if(typeof ue.componentWillUnmount=="function"){var Oe=A.return;try{ue.props=A.memoizedProps,ue.state=A.memoizedState,ue.componentWillUnmount()}catch(Ze){Qi(A,Oe,Ze)}}break;case 5:qp(A,A.return);break;case 22:if(A.memoizedState!==null){BT(v);continue}}te!==null?(te.return=A,Fe=te):BT(v)}ae=ae.sibling}}}switch(J&4102){case 2:jT(h),h.flags&=-3;break;case 6:jT(h),h.flags&=-3,Jv(h.alternate,h);break;case 4096:h.flags&=-4097;break;case 4100:h.flags&=-4097,Jv(h.alternate,h);break;case 4:Jv(h.alternate,h)}}catch(Ze){Qi(h,h.return,Ze)}if(v=h.sibling,v!==null){v.return=h.return,Fe=v;break}Fe=h.return}}}function R4(d,h,v){Fe=d,UT(d)}function UT(d,h,v){for(var A=(d.mode&1)!==0;Fe!==null;){var T=Fe,P=T.child;if(T.tag===22&&A){var W=T.memoizedState!==null||Gp;if(!W){var J=T.alternate,de=J!==null&&J.memoizedState!==null||nl;J=Gp;var Ne=nl;if(Gp=W,(nl=de)&&!Ne)for(Fe=T;Fe!==null;)W=Fe,de=W.child,W.tag===22&&W.memoizedState!==null?VT(T):de!==null?(de.return=W,Fe=de):VT(T);for(;P!==null;)Fe=P,UT(P),P=P.sibling;Fe=T,Gp=J,nl=Ne}zT(d)}else T.subtreeFlags&8772&&P!==null?(P.return=T,Fe=P):zT(d)}}function zT(d){for(;Fe!==null;){var h=Fe;if(h.flags&8772){var v=h.alternate;try{if(h.flags&8772)switch(h.tag){case 0:case 11:case 15:nl||Od(5,h);break;case 1:var A=h.stateNode;if(h.flags&4&&!nl)if(v===null)A.componentDidMount();else{var T=h.elementType===h.type?v.memoizedProps:Yr(h.type,v.memoizedProps);A.componentDidUpdate(T,v.memoizedState,A.__reactInternalSnapshotBeforeUpdate)}var P=h.updateQueue;P!==null&&LM(h,P,A);break;case 3:var W=h.updateQueue;if(W!==null){if(v=null,h.child!==null)switch(h.child.tag){case 5:v=X(h.child.stateNode);break;case 1:v=h.child.stateNode}LM(h,W,v)}break;case 5:var J=h.stateNode;v===null&&h.flags&4&&Dt(J,h.type,h.memoizedProps,h);break;case 6:break;case 4:break;case 12:break;case 13:if(_e&&h.memoizedState===null){var de=h.alternate;if(de!==null){var Ne=de.memoizedState;if(Ne!==null){var qe=Ne.dehydrated;qe!==null&&le(qe)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(a(163))}nl||h.flags&512&&Qv(h)}catch(wt){Qi(h,h.return,wt)}}if(h===d){Fe=null;break}if(v=h.sibling,v!==null){v.return=h.return,Fe=v;break}Fe=h.return}}function BT(d){for(;Fe!==null;){var h=Fe;if(h===d){Fe=null;break}var v=h.sibling;if(v!==null){v.return=h.return,Fe=v;break}Fe=h.return}}function VT(d){for(;Fe!==null;){var h=Fe;try{switch(h.tag){case 0:case 11:case 15:var v=h.return;try{Od(4,h)}catch(de){Qi(h,v,de)}break;case 1:var A=h.stateNode;if(typeof A.componentDidMount=="function"){var T=h.return;try{A.componentDidMount()}catch(de){Qi(h,T,de)}}var P=h.return;try{Qv(h)}catch(de){Qi(h,P,de)}break;case 5:var W=h.return;try{Qv(h)}catch(de){Qi(h,W,de)}}}catch(de){Qi(h,h.return,de)}if(h===d){Fe=null;break}var J=h.sibling;if(J!==null){J.return=h.return,Fe=J;break}Fe=h.return}}var $p=0,Yp=1,Qp=2,Kp=3,Zp=4;if(typeof Symbol=="function"&&Symbol.for){var Ud=Symbol.for;$p=Ud("selector.component"),Yp=Ud("selector.has_pseudo_class"),Qp=Ud("selector.role"),Kp=Ud("selector.test_id"),Zp=Ud("selector.text")}function e0(d){var h=fe(d);if(h!=null){if(typeof h.memoizedProps["data-testname"]!="string")throw Error(a(364));return h}if(d=ne(d),d===null)throw Error(a(362));return d.stateNode.current}function t0(d,h){switch(h.$$typeof){case $p:if(d.type===h.value)return!0;break;case Yp:e:{h=h.value,d=[d,0];for(var v=0;v<d.length;){var A=d[v++],T=d[v++],P=h[T];if(A.tag!==5||!we(A)){for(;P!=null&&t0(A,P);)T++,P=h[T];if(T===h.length){h=!0;break e}else for(A=A.child;A!==null;)d.push(A,T),A=A.sibling}}h=!1}return h;case Qp:if(d.tag===5&&$e(d.stateNode,h.value))return!0;break;case Zp:if((d.tag===5||d.tag===6)&&(d=ve(d),d!==null&&0<=d.indexOf(h.value)))return!0;break;case Kp:if(d.tag===5&&(d=d.memoizedProps["data-testname"],typeof d=="string"&&d.toLowerCase()===h.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function n0(d){switch(d.$$typeof){case $p:return"<"+(N(d.value)||"Unknown")+">";case Yp:return":has("+(n0(d)||"")+")";case Qp:return'[role="'+d.value+'"]';case Zp:return'"'+d.value+'"';case Kp:return'[data-testname="'+d.value+'"]';default:throw Error(a(365))}}function HT(d,h){var v=[];d=[d,0];for(var A=0;A<d.length;){var T=d[A++],P=d[A++],W=h[P];if(T.tag!==5||!we(T)){for(;W!=null&&t0(T,W);)P++,W=h[P];if(P===h.length)v.push(T);else for(T=T.child;T!==null;)d.push(T,P),T=T.sibling}}return v}function i0(d,h){if(!F)throw Error(a(363));d=e0(d),d=HT(d,h),h=[],d=Array.from(d);for(var v=0;v<d.length;){var A=d[v++];if(A.tag===5)we(A)||h.push(A.stateNode);else for(A=A.child;A!==null;)d.push(A),A=A.sibling}return h}var I4=Math.ceil,Jp=o.ReactCurrentDispatcher,r0=o.ReactCurrentOwner,Rn=o.ReactCurrentBatchConfig,Rt=0,zn=null,Bn=null,ui=0,hr=0,Cc=Zn(0),Wn=0,zd=null,Pc=0,em=0,s0=0,Bd=null,$i=null,a0=0,o0=1/0;function Nc(){o0=ei()+500}var tm=!1,l0=null,Va=null,nm=!1,Ha=null,im=0,Vd=0,c0=null,rm=-1,sm=0;function Li(){return Rt&6?ei():rm!==-1?rm:rm=ei()}function Wa(d){return d.mode&1?Rt&2&&ui!==0?ui&-ui:p4.transition!==null?(sm===0&&(d=yp,yp<<=1,!(yp&4194240)&&(yp=64),sm=d),sm):(d=Bt,d!==0?d:he()):1}function Dr(d,h,v){if(50<Vd)throw Vd=0,c0=null,Error(a(185));var A=am(d,h);return A===null?null:(Md(A,h,v),(!(Rt&2)||A!==zn)&&(A===zn&&(!(Rt&2)&&(em|=h),Wn===4&&Ga(A,ui)),Yi(A,v),h===1&&Rt===0&&!(d.mode&1)&&(Nc(),_p&&Ts())),A)}function am(d,h){d.lanes|=h;var v=d.alternate;for(v!==null&&(v.lanes|=h),v=d,d=d.return;d!==null;)d.childLanes|=h,v=d.alternate,v!==null&&(v.childLanes|=h),v=d,d=d.return;return v.tag===3?v.stateNode:null}function Yi(d,h){var v=d.callbackNode;s4(d,h);var A=wp(d,d===zn?ui:0);if(A===0)v!==null&&PM(v),d.callbackNode=null,d.callbackPriority=0;else if(h=A&-A,d.callbackPriority!==h){if(v!=null&&PM(v),h===1)d.tag===0?f4(GT.bind(null,d)):NM(GT.bind(null,d)),De?O(function(){Rt===0&&Ts()}):xv(yv,Ts),v=null;else{switch(CM(A)){case 1:v=yv;break;case 4:v=c4;break;case 16:v=vv;break;case 536870912:v=u4;break;default:v=vv}v=eE(v,WT.bind(null,d))}d.callbackPriority=h,d.callbackNode=v}}function WT(d,h){if(rm=-1,sm=0,Rt&6)throw Error(a(327));var v=d.callbackNode;if(al()&&d.callbackNode!==v)return null;var A=wp(d,d===zn?ui:0);if(A===0)return null;if(A&30||A&d.expiredLanes||h)h=om(d,A);else{h=A;var T=Rt;Rt|=2;var P=$T();(zn!==d||ui!==h)&&(Nc(),rl(d,h));do try{D4();break}catch(J){XT(d,J)}while(!0);_v(),Jp.current=P,Rt=T,Bn!==null?h=0:(zn=null,ui=0,h=Wn)}if(h!==0){if(h===2&&(T=pv(d),T!==0&&(A=T,h=u0(d,T))),h===1)throw v=zd,rl(d,0),Ga(d,A),Yi(d,ei()),v;if(h===6)Ga(d,A);else{if(T=d.current.alternate,!(A&30)&&!k4(T)&&(h=om(d,A),h===2&&(P=pv(d),P!==0&&(A=P,h=u0(d,P))),h===1))throw v=zd,rl(d,0),Ga(d,A),Yi(d,ei()),v;switch(d.finishedWork=T,d.finishedLanes=A,h){case 0:case 1:throw Error(a(345));case 2:sl(d,$i);break;case 3:if(Ga(d,A),(A&130023424)===A&&(h=a0+500-ei(),10<h)){if(wp(d,0)!==0)break;if(T=d.suspendedLanes,(T&A)!==A){Li(),d.pingedLanes|=d.suspendedLanes&T;break}d.timeoutHandle=xe(sl.bind(null,d,$i),h);break}sl(d,$i);break;case 4:if(Ga(d,A),(A&4194240)===A)break;for(h=d.eventTimes,T=-1;0<A;){var W=31-lr(A);P=1<<W,W=h[W],W>T&&(T=W),A&=~P}if(A=T,A=ei()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*I4(A/1960))-A,10<A){d.timeoutHandle=xe(sl.bind(null,d,$i),A);break}sl(d,$i);break;case 5:sl(d,$i);break;default:throw Error(a(329))}}}return Yi(d,ei()),d.callbackNode===v?WT.bind(null,d):null}function u0(d,h){var v=Bd;return d.current.memoizedState.isDehydrated&&(rl(d,h).flags|=256),d=om(d,h),d!==2&&(h=$i,$i=v,h!==null&&d0(h)),d}function d0(d){$i===null?$i=d:$i.push.apply($i,d)}function k4(d){for(var h=d;;){if(h.flags&16384){var v=h.updateQueue;if(v!==null&&(v=v.stores,v!==null))for(var A=0;A<v.length;A++){var T=v[A],P=T.getSnapshot;T=T.value;try{if(!Ms(P(),T))return!1}catch{return!1}}}if(v=h.child,h.subtreeFlags&16384&&v!==null)v.return=h,h=v;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Ga(d,h){for(h&=~s0,h&=~em,d.suspendedLanes|=h,d.pingedLanes&=~h,d=d.expirationTimes;0<h;){var v=31-lr(h),A=1<<v;d[v]=-1,h&=~A}}function GT(d){if(Rt&6)throw Error(a(327));al();var h=wp(d,0);if(!(h&1))return Yi(d,ei()),null;var v=om(d,h);if(d.tag!==0&&v===2){var A=pv(d);A!==0&&(h=A,v=u0(d,A))}if(v===1)throw v=zd,rl(d,0),Ga(d,h),Yi(d,ei()),v;if(v===6)throw Error(a(345));return d.finishedWork=d.current.alternate,d.finishedLanes=h,sl(d,$i),Yi(d,ei()),null}function qT(d){Ha!==null&&Ha.tag===0&&!(Rt&6)&&al();var h=Rt;Rt|=1;var v=Rn.transition,A=Bt;try{if(Rn.transition=null,Bt=1,d)return d()}finally{Bt=A,Rn.transition=v,Rt=h,!(Rt&6)&&Ts()}}function h0(){hr=Cc.current,ft(Cc)}function rl(d,h){d.finishedWork=null,d.finishedLanes=0;var v=d.timeoutHandle;if(v!==it&&(d.timeoutHandle=it,nt(v)),Bn!==null)for(v=Bn.return;v!==null;){var A=v;switch(Pv(A),A.tag){case 1:A=A.type.childContextTypes,A!=null&&Nn();break;case 3:Tc(),ft(Sn),ft(Nt),Fv();break;case 5:Lv(A);break;case 4:Tc();break;case 13:ft(xn);break;case 19:ft(xn);break;case 10:Sv(A.type._context);break;case 22:case 23:h0()}v=v.return}if(zn=d,Bn=d=qa(d.current,null),ui=hr=h,Wn=0,zd=null,s0=em=Pc=0,$i=Bd=null,Es!==null){for(h=0;h<Es.length;h++)if(v=Es[h],A=v.interleaved,A!==null){v.interleaved=null;var T=A.next,P=v.pending;if(P!==null){var W=P.next;P.next=T,A.next=W}v.pending=A}Es=null}return d}function XT(d,h){do{var v=Bn;try{if(_v(),kp.current=Up,Lp){for(var A=An.memoizedState;A!==null;){var T=A.queue;T!==null&&(T.pending=null),A=A.next}Lp=!1}if(Ec=0,ti=mi=An=null,Rd=!1,Id=0,r0.current=null,v===null||v.return===null){Wn=1,zd=h,Bn=null;break}e:{var P=d,W=v.return,J=v,de=h;if(h=ui,J.flags|=32768,de!==null&&typeof de=="object"&&typeof de.then=="function"){var Ne=de,qe=J,wt=qe.tag;if(!(qe.mode&1)&&(wt===0||wt===11||wt===15)){var at=qe.alternate;at?(qe.updateQueue=at.updateQueue,qe.memoizedState=at.memoizedState,qe.lanes=at.lanes):(qe.updateQueue=null,qe.memoizedState=null)}var Zt=pT(W);if(Zt!==null){Zt.flags&=-257,mT(Zt,W,J,P,h),Zt.mode&1&&fT(P,Ne,h),h=Zt,de=Ne;var tt=h.updateQueue;if(tt===null){var yi=new Set;yi.add(de),h.updateQueue=yi}else tt.add(de);break e}else{if(!(h&1)){fT(P,Ne,h),f0();break e}de=Error(a(426))}}else if(fn&&J.mode&1){var jr=pT(W);if(jr!==null){!(jr.flags&65536)&&(jr.flags|=256),mT(jr,W,J,P,h),Iv(de);break e}}P=de,Wn!==4&&(Wn=2),Bd===null?Bd=[P]:Bd.push(P),de=Hv(de,J),J=W;do{switch(J.tag){case 3:J.flags|=65536,h&=-h,J.lanes|=h;var ae=dT(J,de,h);kM(J,ae);break e;case 1:P=de;var te=J.type,ue=J.stateNode;if(!(J.flags&128)&&(typeof te.getDerivedStateFromError=="function"||ue!==null&&typeof ue.componentDidCatch=="function"&&(Va===null||!Va.has(ue)))){J.flags|=65536,h&=-h,J.lanes|=h;var Oe=hT(J,P,h);kM(J,Oe);break e}}J=J.return}while(J!==null)}QT(v)}catch(Ze){h=Ze,Bn===v&&v!==null&&(Bn=v=v.return);continue}break}while(!0)}function $T(){var d=Jp.current;return Jp.current=Up,d===null?Up:d}function f0(){(Wn===0||Wn===3||Wn===2)&&(Wn=4),zn===null||!(Pc&268435455)&&!(em&268435455)||Ga(zn,ui)}function om(d,h){var v=Rt;Rt|=2;var A=$T();zn===d&&ui===h||rl(d,h);do try{L4();break}catch(T){XT(d,T)}while(!0);if(_v(),Rt=v,Jp.current=A,Bn!==null)throw Error(a(261));return zn=null,ui=0,Wn}function L4(){for(;Bn!==null;)YT(Bn)}function D4(){for(;Bn!==null&&!o4();)YT(Bn)}function YT(d){var h=JT(d.alternate,d,hr);d.memoizedProps=d.pendingProps,h===null?QT(d):Bn=h,r0.current=null}function QT(d){var h=d;do{var v=h.alternate;if(d=h.return,h.flags&32768){if(v=E4(v,h),v!==null){v.flags&=32767,Bn=v;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{Wn=6,Bn=null;return}}else if(v=A4(v,h,hr),v!==null){Bn=v;return}if(h=h.sibling,h!==null){Bn=h;return}Bn=h=d}while(h!==null);Wn===0&&(Wn=5)}function sl(d,h){var v=Bt,A=Rn.transition;try{Rn.transition=null,Bt=1,F4(d,h,v)}finally{Rn.transition=A,Bt=v}return null}function F4(d,h,v){do al();while(Ha!==null);if(Rt&6)throw Error(a(327));var A=d.finishedWork,T=d.finishedLanes;if(A===null)return null;if(d.finishedWork=null,d.finishedLanes=0,A===d.current)throw Error(a(177));d.callbackNode=null,d.callbackPriority=0;var P=A.lanes|A.childLanes;if(a4(d,P),d===zn&&(Bn=zn=null,ui=0),!(A.subtreeFlags&2064)&&!(A.flags&2064)||nm||(nm=!0,eE(vv,function(){return al(),null})),P=(A.flags&15990)!==0,A.subtreeFlags&15990||P){P=Rn.transition,Rn.transition=null;var W=Bt;Bt=1;var J=Rt;Rt|=4,r0.current=null,P4(d,A),N4(d,A),B(d.containerInfo),d.current=A,R4(A),l4(),Rt=J,Bt=W,Rn.transition=P}else d.current=A;if(nm&&(nm=!1,Ha=d,im=T),P=d.pendingLanes,P===0&&(Va=null),d4(A.stateNode),Yi(d,ei()),h!==null)for(v=d.onRecoverableError,A=0;A<h.length;A++)v(h[A]);if(tm)throw tm=!1,d=l0,l0=null,d;return im&1&&d.tag!==0&&al(),P=d.pendingLanes,P&1?d===c0?Vd++:(Vd=0,c0=d):Vd=0,Ts(),null}function al(){if(Ha!==null){var d=CM(im),h=Rn.transition,v=Bt;try{if(Rn.transition=null,Bt=16>d?16:d,Ha===null)var A=!1;else{if(d=Ha,Ha=null,im=0,Rt&6)throw Error(a(331));var T=Rt;for(Rt|=4,Fe=d.current;Fe!==null;){var P=Fe,W=P.child;if(Fe.flags&16){var J=P.deletions;if(J!==null){for(var de=0;de<J.length;de++){var Ne=J[de];for(Fe=Ne;Fe!==null;){var qe=Fe;switch(qe.tag){case 0:case 11:case 15:il(8,qe,P)}var wt=qe.child;if(wt!==null)wt.return=qe,Fe=wt;else for(;Fe!==null;){qe=Fe;var at=qe.sibling,Zt=qe.return;if(LT(qe),qe===Ne){Fe=null;break}if(at!==null){at.return=Zt,Fe=at;break}Fe=Zt}}}var tt=P.alternate;if(tt!==null){var yi=tt.child;if(yi!==null){tt.child=null;do{var jr=yi.sibling;yi.sibling=null,yi=jr}while(yi!==null)}}Fe=P}}if(P.subtreeFlags&2064&&W!==null)W.return=P,Fe=W;else e:for(;Fe!==null;){if(P=Fe,P.flags&2048)switch(P.tag){case 0:case 11:case 15:il(9,P,P.return)}var ae=P.sibling;if(ae!==null){ae.return=P.return,Fe=ae;break e}Fe=P.return}}var te=d.current;for(Fe=te;Fe!==null;){W=Fe;var ue=W.child;if(W.subtreeFlags&2064&&ue!==null)ue.return=W,Fe=ue;else e:for(W=te;Fe!==null;){if(J=Fe,J.flags&2048)try{switch(J.tag){case 0:case 11:case 15:Od(9,J)}}catch(Ze){Qi(J,J.return,Ze)}if(J===W){Fe=null;break e}var Oe=J.sibling;if(Oe!==null){Oe.return=J.return,Fe=Oe;break e}Fe=J.return}}if(Rt=T,Ts(),As&&typeof As.onPostCommitFiberRoot=="function")try{As.onPostCommitFiberRoot(bp,d)}catch{}A=!0}return A}finally{Bt=v,Rn.transition=h}}return!1}function KT(d,h,v){h=Hv(v,h),h=dT(d,h,1),Ba(d,h),h=Li(),d=am(d,1),d!==null&&(Md(d,1,h),Yi(d,h))}function Qi(d,h,v){if(d.tag===3)KT(d,d,v);else for(;h!==null;){if(h.tag===3){KT(h,d,v);break}else if(h.tag===1){var A=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&(Va===null||!Va.has(A))){d=Hv(v,d),d=hT(h,d,1),Ba(h,d),d=Li(),h=am(h,1),h!==null&&(Md(h,1,d),Yi(h,d));break}}h=h.return}}function j4(d,h,v){var A=d.pingCache;A!==null&&A.delete(h),h=Li(),d.pingedLanes|=d.suspendedLanes&v,zn===d&&(ui&v)===v&&(Wn===4||Wn===3&&(ui&130023424)===ui&&500>ei()-a0?rl(d,0):s0|=v),Yi(d,h)}function ZT(d,h){h===0&&(d.mode&1?(h=vp,vp<<=1,!(vp&130023424)&&(vp=4194304)):h=1);var v=Li();d=am(d,h),d!==null&&(Md(d,h,v),Yi(d,v))}function O4(d){var h=d.memoizedState,v=0;h!==null&&(v=h.retryLane),ZT(d,v)}function U4(d,h){var v=0;switch(d.tag){case 13:var A=d.stateNode,T=d.memoizedState;T!==null&&(v=T.retryLane);break;case 19:A=d.stateNode;break;default:throw Error(a(314))}A!==null&&A.delete(h),ZT(d,v)}var JT;JT=function(d,h,v){if(d!==null)if(d.memoizedProps!==h.pendingProps||Sn.current)dr=!0;else{if(!(d.lanes&v)&&!(h.flags&128))return dr=!1,T4(d,h,v);dr=!!(d.flags&131072)}else dr=!1,fn&&h.flags&1048576&&UM(h,Np,h.index);switch(h.lanes=0,h.tag){case 2:var A=h.type;d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),d=h.pendingProps;var T=Pr(h,Nt.current);wc(h,v),T=Ov(null,h,A,d,T,v);var P=Uv();return h.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,Jn(A)?(P=!0,ci(h)):P=!1,h.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,Mv(h),T.updater=Cp,h.stateNode=T,T._reactInternals=h,Ev(h,A,d,v),h=qv(null,h,A,!0,P,v)):(h.tag=0,fn&&P&&Cv(h),ki(null,h,T,v),h=h.child),h;case 16:A=h.elementType;e:{switch(d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),d=h.pendingProps,T=A._init,A=T(A._payload),h.type=A,T=h.tag=B4(A),d=Yr(A,d),T){case 0:h=Gv(null,h,A,d,v);break e;case 1:h=ST(null,h,A,d,v);break e;case 11:h=yT(null,h,A,d,v);break e;case 14:h=vT(null,h,A,Yr(A.type,d),v);break e}throw Error(a(306,A,""))}return h;case 0:return A=h.type,T=h.pendingProps,T=h.elementType===A?T:Yr(A,T),Gv(d,h,A,T,v);case 1:return A=h.type,T=h.pendingProps,T=h.elementType===A?T:Yr(A,T),ST(d,h,A,T,v);case 3:e:{if(AT(h),d===null)throw Error(a(387));A=h.pendingProps,P=h.memoizedState,T=P.element,IM(d,h),Ep(h,A,null,v);var W=h.memoizedState;if(A=W.element,_e&&P.isDehydrated)if(P={element:A,isDehydrated:!1,cache:W.cache,transitions:W.transitions},h.updateQueue.baseState=P,h.memoizedState=P,h.flags&256){T=Error(a(423)),h=MT(d,h,A,v,T);break e}else if(A!==T){T=Error(a(424)),h=MT(d,h,A,v,T);break e}else for(_e&&(ur=mp(h.stateNode.containerInfo),cr=h,fn=!0,Qr=null,Td=!1),v=GM(h,null,A,v),h.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(Sc(),A===T){h=ra(d,h,v);break e}ki(d,h,A,v)}h=h.child}return h;case 5:return qM(h),d===null&&Rv(h),A=h.type,T=h.pendingProps,P=d!==null?d.memoizedProps:null,W=T.children,ge(A,T)?W=null:P!==null&&ge(A,P)&&(h.flags|=32),_T(d,h),ki(d,h,W,v),h.child;case 6:return d===null&&Rv(h),null;case 13:return TT(d,h,v);case 4:return kv(h,h.stateNode.containerInfo),A=h.pendingProps,d===null?h.child=Ac(h,null,A,v):ki(d,h,A,v),h.child;case 11:return A=h.type,T=h.pendingProps,T=h.elementType===A?T:Yr(A,T),yT(d,h,A,T,v);case 7:return ki(d,h,h.pendingProps,v),h.child;case 8:return ki(d,h,h.pendingProps.children,v),h.child;case 12:return ki(d,h,h.pendingProps.children,v),h.child;case 10:e:{if(A=h.type._context,T=h.pendingProps,P=h.memoizedProps,W=T.value,RM(h,A,W),P!==null)if(Ms(P.value,W)){if(P.children===T.children&&!Sn.current){h=ra(d,h,v);break e}}else for(P=h.child,P!==null&&(P.return=h);P!==null;){var J=P.dependencies;if(J!==null){W=P.child;for(var de=J.firstContext;de!==null;){if(de.context===A){if(P.tag===1){de=ea(-1,v&-v),de.tag=2;var Ne=P.updateQueue;if(Ne!==null){Ne=Ne.shared;var qe=Ne.pending;qe===null?de.next=de:(de.next=qe.next,qe.next=de),Ne.pending=de}}P.lanes|=v,de=P.alternate,de!==null&&(de.lanes|=v),Av(P.return,v,h),J.lanes|=v;break}de=de.next}}else if(P.tag===10)W=P.type===h.type?null:P.child;else if(P.tag===18){if(W=P.return,W===null)throw Error(a(341));W.lanes|=v,J=W.alternate,J!==null&&(J.lanes|=v),Av(W,v,h),W=P.sibling}else W=P.child;if(W!==null)W.return=P;else for(W=P;W!==null;){if(W===h){W=null;break}if(P=W.sibling,P!==null){P.return=W.return,W=P;break}W=W.return}P=W}ki(d,h,T.children,v),h=h.child}return h;case 9:return T=h.type,A=h.pendingProps.children,wc(h,v),T=Nr(T),A=A(T),h.flags|=1,ki(d,h,A,v),h.child;case 14:return A=h.type,T=Yr(A,h.pendingProps),T=Yr(A.type,T),vT(d,h,A,T,v);case 15:return wT(d,h,h.type,h.pendingProps,v);case 17:return A=h.type,T=h.pendingProps,T=h.elementType===A?T:Yr(A,T),d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2),h.tag=1,Jn(A)?(d=!0,ci(h)):d=!1,wc(h,v),jM(h,A,T),Ev(h,A,T,v),qv(null,h,A,!0,d,v);case 19:return NT(d,h,v);case 22:return bT(d,h,v)}throw Error(a(156,h.tag))};function eE(d,h){return xv(d,h)}function z4(d,h,v,A){this.tag=d,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fr(d,h,v,A){return new z4(d,h,v,A)}function p0(d){return d=d.prototype,!(!d||!d.isReactComponent)}function B4(d){if(typeof d=="function")return p0(d)?1:0;if(d!=null){if(d=d.$$typeof,d===b)return 11;if(d===_)return 14}return 2}function qa(d,h){var v=d.alternate;return v===null?(v=Fr(d.tag,h,d.key,d.mode),v.elementType=d.elementType,v.type=d.type,v.stateNode=d.stateNode,v.alternate=d,d.alternate=v):(v.pendingProps=h,v.type=d.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=d.flags&14680064,v.childLanes=d.childLanes,v.lanes=d.lanes,v.child=d.child,v.memoizedProps=d.memoizedProps,v.memoizedState=d.memoizedState,v.updateQueue=d.updateQueue,h=d.dependencies,v.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},v.sibling=d.sibling,v.index=d.index,v.ref=d.ref,v}function lm(d,h,v,A,T,P){var W=2;if(A=d,typeof d=="function")p0(d)&&(W=1);else if(typeof d=="string")W=5;else e:switch(d){case f:return ol(v.children,T,P,h);case p:W=8,T|=8;break;case m:return d=Fr(12,v,h,T|2),d.elementType=m,d.lanes=P,d;case w:return d=Fr(13,v,h,T),d.elementType=w,d.lanes=P,d;case x:return d=Fr(19,v,h,T),d.elementType=x,d.lanes=P,d;case M:return cm(v,T,P,h);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case g:W=10;break e;case y:W=9;break e;case b:W=11;break e;case _:W=14;break e;case S:W=16,A=null;break e}throw Error(a(130,d==null?d:typeof d,""))}return h=Fr(W,v,h,T),h.elementType=d,h.type=A,h.lanes=P,h}function ol(d,h,v,A){return d=Fr(7,d,A,h),d.lanes=v,d}function cm(d,h,v,A){return d=Fr(22,d,A,h),d.elementType=M,d.lanes=v,d.stateNode={},d}function m0(d,h,v){return d=Fr(6,d,null,h),d.lanes=v,d}function g0(d,h,v){return h=Fr(4,d.children!==null?d.children:[],d.key,h),h.lanes=v,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}function V4(d,h,v,A,T){this.tag=h,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=it,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mv(0),this.expirationTimes=mv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mv(0),this.identifierPrefix=A,this.onRecoverableError=T,_e&&(this.mutableSourceEagerHydrationData=null)}function tE(d,h,v,A,T,P,W,J,de){return d=new V4(d,h,v,J,de),h===1?(h=1,P===!0&&(h|=8)):h=0,P=Fr(3,null,null,h),d.current=P,P.stateNode=d,P.memoizedState={element:A,isDehydrated:v,cache:null,transitions:null},Mv(P),d}function nE(d){if(!d)return Cr;d=d._reactInternals;e:{if(R(d)!==d||d.tag!==1)throw Error(a(170));var h=d;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(Jn(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(a(171))}if(d.tag===1){var v=d.type;if(Jn(v))return xc(d,v,h)}return h}function iE(d){var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(a(188)):(d=Object.keys(d).join(","),Error(a(268,d)));return d=G(h),d===null?null:d.stateNode}function rE(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var v=d.retryLane;d.retryLane=v!==0&&v<h?v:h}}function x0(d,h){rE(d,h),(d=d.alternate)&&rE(d,h)}function H4(d){return d=G(d),d===null?null:d.stateNode}function W4(){return null}return n.attemptContinuousHydration=function(d){if(d.tag===13){var h=Li();Dr(d,134217728,h),x0(d,134217728)}},n.attemptHydrationAtCurrentPriority=function(d){if(d.tag===13){var h=Li(),v=Wa(d);Dr(d,v,h),x0(d,v)}},n.attemptSynchronousHydration=function(d){switch(d.tag){case 3:var h=d.stateNode;if(h.current.memoizedState.isDehydrated){var v=Ad(h.pendingLanes);v!==0&&(gv(h,v|1),Yi(h,ei()),!(Rt&6)&&(Nc(),Ts()))}break;case 13:var A=Li();qT(function(){return Dr(d,1,A)}),x0(d,1)}},n.batchedUpdates=function(d,h){var v=Rt;Rt|=1;try{return d(h)}finally{Rt=v,Rt===0&&(Nc(),_p&&Ts())}},n.createComponentSelector=function(d){return{$$typeof:$p,value:d}},n.createContainer=function(d,h,v,A,T,P,W){return tE(d,h,!1,null,v,A,T,P,W)},n.createHasPseudoClassSelector=function(d){return{$$typeof:Yp,value:d}},n.createHydrationContainer=function(d,h,v,A,T,P,W,J,de){return d=tE(v,A,!0,d,T,P,W,J,de),d.context=nE(null),v=d.current,A=Li(),T=Wa(v),P=ea(A,T),P.callback=h??null,Ba(v,P),d.current.lanes=T,Md(d,T,A),Yi(d,A),d},n.createPortal=function(d,h,v){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:A==null?null:""+A,children:d,containerInfo:h,implementation:v}},n.createRoleSelector=function(d){return{$$typeof:Qp,value:d}},n.createTestNameSelector=function(d){return{$$typeof:Kp,value:d}},n.createTextSelector=function(d){return{$$typeof:Zp,value:d}},n.deferredUpdates=function(d){var h=Bt,v=Rn.transition;try{return Rn.transition=null,Bt=16,d()}finally{Bt=h,Rn.transition=v}},n.discreteUpdates=function(d,h,v,A,T){var P=Bt,W=Rn.transition;try{return Rn.transition=null,Bt=1,d(h,v,A,T)}finally{Bt=P,Rn.transition=W,Rt===0&&Nc()}},n.findAllNodes=i0,n.findBoundingRects=function(d,h){if(!F)throw Error(a(363));h=i0(d,h),d=[];for(var v=0;v<h.length;v++)d.push(Se(h[v]));for(h=d.length-1;0<h;h--){v=d[h];for(var A=v.x,T=A+v.width,P=v.y,W=P+v.height,J=h-1;0<=J;J--)if(h!==J){var de=d[J],Ne=de.x,qe=Ne+de.width,wt=de.y,at=wt+de.height;if(A>=Ne&&P>=wt&&T<=qe&&W<=at){d.splice(h,1);break}else if(A!==Ne||v.width!==de.width||at<P||wt>W){if(!(P!==wt||v.height!==de.height||qe<A||Ne>T)){Ne>A&&(de.width+=Ne-A,de.x=A),qe<T&&(de.width=T-Ne),d.splice(h,1);break}}else{wt>P&&(de.height+=wt-P,de.y=P),at<W&&(de.height=W-wt),d.splice(h,1);break}}}return d},n.findHostInstance=iE,n.findHostInstanceWithNoPortals=function(d){return d=V(d),d=d!==null?z(d):null,d===null?null:d.stateNode},n.findHostInstanceWithWarning=function(d){return iE(d)},n.flushControlled=function(d){var h=Rt;Rt|=1;var v=Rn.transition,A=Bt;try{Rn.transition=null,Bt=1,d()}finally{Bt=A,Rn.transition=v,Rt=h,Rt===0&&(Nc(),Ts())}},n.flushPassiveEffects=al,n.flushSync=qT,n.focusWithin=function(d,h){if(!F)throw Error(a(363));for(d=e0(d),h=HT(d,h),h=Array.from(h),d=0;d<h.length;){var v=h[d++];if(!we(v)){if(v.tag===5&&Pe(v.stateNode))return!0;for(v=v.child;v!==null;)h.push(v),v=v.sibling}}return!1},n.getCurrentUpdatePriority=function(){return Bt},n.getFindAllNodesFailureDescription=function(d,h){if(!F)throw Error(a(363));var v=0,A=[];d=[e0(d),0];for(var T=0;T<d.length;){var P=d[T++],W=d[T++],J=h[W];if((P.tag!==5||!we(P))&&(t0(P,J)&&(A.push(n0(J)),W++,W>v&&(v=W)),W<h.length))for(P=P.child;P!==null;)d.push(P,W),P=P.sibling}if(v<h.length){for(d=[];v<h.length;v++)d.push(n0(h[v]));return`findAllNodes was able to match part of the selector:
`+(A.join(" > ")+`
No matching component was found for:
`)+d.join(" > ")}return null},n.getPublicRootInstance=function(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return X(d.child.stateNode);default:return d.child.stateNode}},n.injectIntoDevTools=function(d){if(d={bundleType:d.bundleType,version:d.version,rendererPackageName:d.rendererPackageName,rendererConfig:d.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:H4,findFiberByHostInstance:d.findFiberByHostInstance||W4,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")d=!1;else{var h=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(h.isDisabled||!h.supportsFiber)d=!0;else{try{bp=h.inject(d),As=h}catch{}d=!!h.checkDCE}}return d},n.isAlreadyRendering=function(){return!1},n.observeVisibleRects=function(d,h,v,A){if(!F)throw Error(a(363));d=i0(d,h);var T=je(d,v,A).disconnect;return{disconnect:function(){T()}}},n.registerMutableSourceForHydration=function(d,h){var v=h._getVersion;v=v(h._source),d.mutableSourceEagerHydrationData==null?d.mutableSourceEagerHydrationData=[h,v]:d.mutableSourceEagerHydrationData.push(h,v)},n.runWithPriority=function(d,h){var v=Bt;try{return Bt=d,h()}finally{Bt=v}},n.shouldError=function(){return null},n.shouldSuspend=function(){return!1},n.updateContainer=function(d,h,v,A){var T=h.current,P=Li(),W=Wa(T);return v=nE(v),h.context===null?h.context=v:h.pendingContext=v,h=ea(P,W),h.payload={element:d},A=A===void 0?null:A,A!==null&&(h.callback=A),Ba(T,h),d=Dr(T,W,P),d!==null&&Tp(d,T,W),W},n};fO.exports=zee;var Bee=fO.exports;const Vee=P_(Bee);var pO={exports:{}},mO={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(t){function e(L,j){var B=L.length;L.push(j);e:for(;0<B;){var Y=B-1>>>1,Z=L[Y];if(0<r(Z,j))L[Y]=j,L[B]=Z,B=Y;else break e}}function n(L){return L.length===0?null:L[0]}function i(L){if(L.length===0)return null;var j=L[0],B=L.pop();if(B!==j){L[0]=B;e:for(var Y=0,Z=L.length,K=Z>>>1;Y<K;){var se=2*(Y+1)-1,ge=L[se],Ce=se+1,xe=L[Ce];if(0>r(ge,B))Ce<Z&&0>r(xe,ge)?(L[Y]=xe,L[Ce]=B,Y=Ce):(L[Y]=ge,L[se]=B,Y=se);else if(Ce<Z&&0>r(xe,B))L[Y]=xe,L[Ce]=B,Y=Ce;else break e}}return j}function r(L,j){var B=L.sortIndex-j.sortIndex;return B!==0?B:L.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var c=[],u=[],f=1,p=null,m=3,g=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(L){for(var j=n(u);j!==null;){if(j.callback===null)i(u);else if(j.startTime<=L)i(u),j.sortIndex=j.expirationTime,e(c,j);else break;j=n(u)}}function M(L){if(b=!1,S(L),!y)if(n(c)!==null)y=!0,X(E);else{var j=n(u);j!==null&&ee(M,j.startTime-L)}}function E(L,j){y=!1,b&&(b=!1,x(D),D=-1),g=!0;var B=m;try{for(S(j),p=n(c);p!==null&&(!(p.expirationTime>j)||L&&!V());){var Y=p.callback;if(typeof Y=="function"){p.callback=null,m=p.priorityLevel;var Z=Y(p.expirationTime<=j);j=t.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(c)&&i(c),S(j)}else i(c);p=n(c)}if(p!==null)var K=!0;else{var se=n(u);se!==null&&ee(M,se.startTime-j),K=!1}return K}finally{p=null,m=B,g=!1}}var C=!1,N=null,D=-1,R=5,k=-1;function V(){return!(t.unstable_now()-k<R)}function G(){if(N!==null){var L=t.unstable_now();k=L;var j=!0;try{j=N(!0,L)}finally{j?ie():(C=!1,N=null)}}else C=!1}var ie;if(typeof _=="function")ie=function(){_(G)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,$=z.port2;z.port1.onmessage=G,ie=function(){$.postMessage(null)}}else ie=function(){w(G,0)};function X(L){N=L,C||(C=!0,ie())}function ee(L,j){D=w(function(){L(t.unstable_now())},j)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){y||g||(y=!0,X(E))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return m},t.unstable_getFirstCallbackNode=function(){return n(c)},t.unstable_next=function(L){switch(m){case 1:case 2:case 3:var j=3;break;default:j=m}var B=m;m=j;try{return L()}finally{m=B}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,j){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var B=m;m=L;try{return j()}finally{m=B}},t.unstable_scheduleCallback=function(L,j,B){var Y=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Y+B:Y):B=Y,L){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=B+Z,L={id:f++,callback:j,priorityLevel:L,startTime:B,expirationTime:Z,sortIndex:-1},B>Y?(L.sortIndex=B,e(u,L),n(c)===null&&L===n(u)&&(b?(x(D),D=-1):b=!0,ee(M,B-Y))):(L.sortIndex=Z,e(c,L),y||g||(y=!0,X(E))),L},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(L){var j=m;return function(){var B=m;m=j;try{return L.apply(this,arguments)}finally{m=B}}}})(mO);pO.exports=mO;var XN=pO.exports;const xM={},Hee=t=>void Object.assign(xM,t);function Wee(t,e){function n(f,{args:p=[],attach:m,...g},y){let b=`${f[0].toUpperCase()}${f.slice(1)}`,w;if(f==="primitive"){if(g.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const x=g.object;w=tu(x,{type:f,root:y,attach:m,primitive:!0})}else{const x=xM[b];if(!x)throw new Error(`R3F: ${b} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(p))throw new Error("R3F: The args prop must be an array!");w=tu(new x(...p),{type:f,root:y,attach:m,memoizedProps:{args:p}})}return w.__r3f.attach===void 0&&(w.isBufferGeometry?w.__r3f.attach="geometry":w.isMaterial&&(w.__r3f.attach="material")),b!=="inject"&&tb(w,g),w}function i(f,p){let m=!1;if(p){var g,y;(g=p.__r3f)!=null&&g.attach?eb(f,p,p.__r3f.attach):p.isObject3D&&f.isObject3D&&(f.add(p),m=!0),m||(y=f.__r3f)==null||y.objects.push(p),p.__r3f||tu(p,{}),p.__r3f.parent=f,E_(p),nu(p)}}function r(f,p,m){let g=!1;if(p){var y,b;if((y=p.__r3f)!=null&&y.attach)eb(f,p,p.__r3f.attach);else if(p.isObject3D&&f.isObject3D){p.parent=f,p.dispatchEvent({type:"added"}),f.dispatchEvent({type:"childadded",child:p});const w=f.children.filter(_=>_!==p),x=w.indexOf(m);f.children=[...w.slice(0,x),p,...w.slice(x)],g=!0}g||(b=f.__r3f)==null||b.objects.push(p),p.__r3f||tu(p,{}),p.__r3f.parent=f,E_(p),nu(p)}}function s(f,p,m=!1){f&&[...f].forEach(g=>a(p,g,m))}function a(f,p,m){if(p){var g,y,b;if(p.__r3f&&(p.__r3f.parent=null),(g=f.__r3f)!=null&&g.objects&&(f.__r3f.objects=f.__r3f.objects.filter(M=>M!==p)),(y=p.__r3f)!=null&&y.attach)ZN(f,p,p.__r3f.attach);else if(p.isObject3D&&f.isObject3D){var w;f.remove(p),(w=p.__r3f)!=null&&w.root&&Zee(ix(p),p)}const _=(b=p.__r3f)==null?void 0:b.primitive,S=!_&&(m===void 0?p.dispose!==null:m);if(!_){var x;s((x=p.__r3f)==null?void 0:x.objects,p,S),s(p.children,p,S)}if(delete p.__r3f,S&&p.dispose&&p.type!=="Scene"){const M=()=>{try{p.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?XN.unstable_scheduleCallback(XN.unstable_IdlePriority,M):M()}nu(f)}}function o(f,p,m,g){var y;const b=(y=f.__r3f)==null?void 0:y.parent;if(!b)return;const w=n(p,m,f.__r3f.root);if(f.children){for(const x of f.children)x.__r3f&&i(w,x);f.children=f.children.filter(x=>!x.__r3f)}f.__r3f.objects.forEach(x=>i(w,x)),f.__r3f.objects=[],f.__r3f.autoRemovedBeforeAppend||a(b,f),w.parent&&(w.__r3f.autoRemovedBeforeAppend=!0),i(b,w),w.raycast&&w.__r3f.eventCount&&ix(w).getState().internal.interaction.push(w),[g,g.alternate].forEach(x=>{x!==null&&(x.stateNode=w,x.ref&&(typeof x.ref=="function"?x.ref(w):x.ref.current=w))})}const c=()=>{};return{reconciler:Vee({createInstance:n,removeChild:a,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(f,p)=>{if(!p)return;const m=f.getState().scene;m.__r3f&&(m.__r3f.root=f,i(m,p))},removeChildFromContainer:(f,p)=>{p&&a(f.getState().scene,p)},insertInContainerBefore:(f,p,m)=>{if(!p||!m)return;const g=f.getState().scene;g.__r3f&&r(g,p,m)},getRootHostContext:()=>null,getChildHostContext:f=>f,finalizeInitialChildren(f){var p;return!!((p=f==null?void 0:f.__r3f)!=null?p:{}).handlers},prepareUpdate(f,p,m,g){var y;if(((y=f==null?void 0:f.__r3f)!=null?y:{}).primitive&&g.object&&g.object!==f)return[!0];{const{args:w=[],children:x,..._}=g,{args:S=[],children:M,...E}=m;if(!Array.isArray(w))throw new Error("R3F: the args prop must be an array!");if(w.some((N,D)=>N!==S[D]))return[!0];const C=_O(f,_,E,!0);return C.changes.length?[!1,C]:null}},commitUpdate(f,[p,m],g,y,b,w){p?o(f,g,b,w):tb(f,m)},commitMount(f,p,m,g){var y;const b=(y=f.__r3f)!=null?y:{};f.raycast&&b.handlers&&b.eventCount&&ix(f).getState().internal.interaction.push(f)},getPublicInstance:f=>f,prepareForCommit:()=>null,preparePortalMount:f=>tu(f.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(f){var p;const{attach:m,parent:g}=(p=f.__r3f)!=null?p:{};m&&g&&ZN(g,f,m),f.isObject3D&&(f.visible=!1),nu(f)},unhideInstance(f,p){var m;const{attach:g,parent:y}=(m=f.__r3f)!=null?m:{};g&&y&&eb(y,f,g),(f.isObject3D&&p.visible==null||p.visible)&&(f.visible=!0),nu(f)},createTextInstance:c,hideTextInstance:c,unhideTextInstance:c,getCurrentEventPriority:()=>e?e():Mu.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&on.fun(performance.now)?performance.now:on.fun(Date.now)?Date.now:()=>0,scheduleTimeout:on.fun(setTimeout)?setTimeout:void 0,cancelTimeout:on.fun(clearTimeout)?clearTimeout:void 0}),applyProps:tb}}var $N,YN;const Jw=t=>"colorSpace"in t||"outputColorSpace"in t,gO=()=>{var t;return(t=xM.ColorManagement)!=null?t:null},xO=t=>t&&t.isOrthographicCamera,Gee=t=>t&&t.hasOwnProperty("current"),pp=typeof window<"u"&&(($N=window.document)!=null&&$N.createElement||((YN=window.navigator)==null?void 0:YN.product)==="ReactNative")?I.useLayoutEffect:I.useEffect;function yO(t){const e=I.useRef(t);return pp(()=>void(e.current=t),[t]),e}function qee({set:t}){return pp(()=>(t(new Promise(()=>null)),()=>t(!1)),[t]),null}class vO extends I.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}vO.getDerivedStateFromError=()=>({error:!0});const wO="__default",QN=new Map,Xee=t=>t&&!!t.memoized&&!!t.changes;function bO(t){var e;const n=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(t)?Math.min(Math.max(t[0],n),t[1]):t}const dh=t=>{var e;return(e=t.__r3f)==null?void 0:e.root.getState()};function ix(t){let e=t.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const on={obj:t=>t===Object(t)&&!on.arr(t)&&typeof t!="function",fun:t=>typeof t=="function",str:t=>typeof t=="string",num:t=>typeof t=="number",boo:t=>typeof t=="boolean",und:t=>t===void 0,arr:t=>Array.isArray(t),equ(t,e,{arrays:n="shallow",objects:i="reference",strict:r=!0}={}){if(typeof t!=typeof e||!!t!=!!e)return!1;if(on.str(t)||on.num(t)||on.boo(t))return t===e;const s=on.obj(t);if(s&&i==="reference")return t===e;const a=on.arr(t);if(a&&n==="reference")return t===e;if((a||s)&&t===e)return!0;let o;for(o in t)if(!(o in e))return!1;if(s&&n==="shallow"&&i==="shallow"){for(o in r?e:t)if(!on.equ(t[o],e[o],{strict:r,objects:"reference"}))return!1}else for(o in r?e:t)if(t[o]!==e[o])return!1;if(on.und(o)){if(a&&t.length===0&&e.length===0||s&&Object.keys(t).length===0&&Object.keys(e).length===0)return!0;if(t!==e)return!1}return!0}};function $ee(t){t.dispose&&t.type!=="Scene"&&t.dispose();for(const e in t)e.dispose==null||e.dispose(),delete t[e]}function tu(t,e){const n=t;return n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},t}function T_(t,e){let n=t;if(e.includes("-")){const i=e.split("-"),r=i.pop();return n=i.reduce((s,a)=>s[a],t),{target:n,key:r}}else return{target:n,key:e}}const KN=/-\d+$/;function eb(t,e,n){if(on.str(n)){if(KN.test(n)){const s=n.replace(KN,""),{target:a,key:o}=T_(t,s);Array.isArray(a[o])||(a[o]=[])}const{target:i,key:r}=T_(t,n);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=n(t,e)}function ZN(t,e,n){var i,r;if(on.str(n)){const{target:s,key:a}=T_(t,n),o=e.__r3f.previousAttach;o===void 0?delete s[a]:s[a]=o}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(t,e);(r=e.__r3f)==null||delete r.previousAttach}function _O(t,{children:e,key:n,ref:i,...r},{children:s,key:a,ref:o,...c}={},u=!1){const f=t.__r3f,p=Object.entries(r),m=[];if(u){const y=Object.keys(c);for(let b=0;b<y.length;b++)r.hasOwnProperty(y[b])||p.unshift([y[b],wO+"remove"])}p.forEach(([y,b])=>{var w;if((w=t.__r3f)!=null&&w.primitive&&y==="object"||on.equ(b,c[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return m.push([y,b,!0,[]]);let x=[];y.includes("-")&&(x=y.split("-")),m.push([y,b,!1,x]);for(const _ in r){const S=r[_];_.startsWith(`${y}-`)&&m.push([_,S,!1,_.split("-")])}});const g={...r};return f!=null&&f.memoizedProps&&f!=null&&f.memoizedProps.args&&(g.args=f.memoizedProps.args),f!=null&&f.memoizedProps&&f!=null&&f.memoizedProps.attach&&(g.attach=f.memoizedProps.attach),{memoized:g,changes:m}}const Yee=typeof process<"u"&&!1;function tb(t,e){var n;const i=t.__r3f,r=i==null?void 0:i.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:a,changes:o}=Xee(e)?e:_O(t,e),c=i==null?void 0:i.eventCount;t.__r3f&&(t.__r3f.memoizedProps=a);for(let m=0;m<o.length;m++){let[g,y,b,w]=o[m];if(Jw(t)){const M="srgb",E="srgb-linear";g==="encoding"?(g="colorSpace",y=y===3001?M:E):g==="outputEncoding"&&(g="outputColorSpace",y=y===3001?M:E)}let x=t,_=x[g];if(w.length&&(_=w.reduce((S,M)=>S[M],t),!(_&&_.set))){const[S,...M]=w.reverse();x=M.reverse().reduce((E,C)=>E[C],t),g=S}if(y===wO+"remove")if(x.constructor){let S=QN.get(x.constructor);S||(S=new x.constructor,QN.set(x.constructor,S)),y=S[g]}else y=0;if(b&&i)y?i.handlers[g]=y:delete i.handlers[g],i.eventCount=Object.keys(i.handlers).length;else if(_&&_.set&&(_.copy||_ instanceof ql)){if(Array.isArray(y))_.fromArray?_.fromArray(y):_.set(...y);else if(_.copy&&y&&y.constructor&&(Yee?_.constructor.name===y.constructor.name:_.constructor===y.constructor))_.copy(y);else if(y!==void 0){var u;const S=(u=_)==null?void 0:u.isColor;!S&&_.setScalar?_.setScalar(y):_ instanceof ql&&y instanceof ql?_.mask=y.mask:_.set(y),!gO()&&s&&!s.linear&&S&&_.convertSRGBToLinear()}}else{var f;if(x[g]=y,(f=x[g])!=null&&f.isTexture&&x[g].format===zi&&x[g].type===Gs&&s){const S=x[g];Jw(S)&&Jw(s.gl)?S.colorSpace=s.gl.outputColorSpace:S.encoding=s.gl.outputEncoding}}nu(t)}if(i&&i.parent&&t.raycast&&c!==i.eventCount){const m=ix(t).getState().internal,g=m.interaction.indexOf(t);g>-1&&m.interaction.splice(g,1),i.eventCount&&m.interaction.push(t)}return!(o.length===1&&o[0][0]==="onUpdate")&&o.length&&(n=t.__r3f)!=null&&n.parent&&E_(t),t}function nu(t){var e,n;const i=(e=t.__r3f)==null||(n=e.root)==null||n.getState==null?void 0:n.getState();i&&i.internal.frames===0&&i.invalidate()}function E_(t){t.onUpdate==null||t.onUpdate(t)}function Qee(t,e){t.manual||(xO(t)?(t.left=e.width/-2,t.right=e.width/2,t.top=e.height/2,t.bottom=e.height/-2):t.aspect=e.width/e.height,t.updateProjectionMatrix(),t.updateMatrixWorld())}function Pg(t){return(t.eventObject||t.object).uuid+"/"+t.index+t.instanceId}function Kee(){var t;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Mu.DefaultEventPriority;switch((t=e.event)==null?void 0:t.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Mu.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Mu.ContinuousEventPriority;default:return Mu.DefaultEventPriority}}function SO(t,e,n,i){const r=n.get(e);r&&(n.delete(e),n.size===0&&(t.delete(i),r.target.releasePointerCapture(i)))}function Zee(t,e){const{internal:n}=t.getState();n.interaction=n.interaction.filter(i=>i!==e),n.initialHits=n.initialHits.filter(i=>i!==e),n.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&n.hovered.delete(r)}),n.capturedMap.forEach((i,r)=>{SO(n.capturedMap,e,i,r)})}function Jee(t){function e(c){const{internal:u}=t.getState(),f=c.offsetX-u.initialClick[0],p=c.offsetY-u.initialClick[1];return Math.round(Math.sqrt(f*f+p*p))}function n(c){return c.filter(u=>["Move","Over","Enter","Out","Leave"].some(f=>{var p;return(p=u.__r3f)==null?void 0:p.handlers["onPointer"+f]}))}function i(c,u){const f=t.getState(),p=new Set,m=[],g=u?u(f.internal.interaction):f.internal.interaction;for(let x=0;x<g.length;x++){const _=dh(g[x]);_&&(_.raycaster.camera=void 0)}f.previousRoot||f.events.compute==null||f.events.compute(c,f);function y(x){const _=dh(x);if(!_||!_.events.enabled||_.raycaster.camera===null)return[];if(_.raycaster.camera===void 0){var S;_.events.compute==null||_.events.compute(c,_,(S=_.previousRoot)==null?void 0:S.getState()),_.raycaster.camera===void 0&&(_.raycaster.camera=null)}return _.raycaster.camera?_.raycaster.intersectObject(x,!0):[]}let b=g.flatMap(y).sort((x,_)=>{const S=dh(x.object),M=dh(_.object);return!S||!M?x.distance-_.distance:M.events.priority-S.events.priority||x.distance-_.distance}).filter(x=>{const _=Pg(x);return p.has(_)?!1:(p.add(_),!0)});f.events.filter&&(b=f.events.filter(b,f));for(const x of b){let _=x.object;for(;_;){var w;(w=_.__r3f)!=null&&w.eventCount&&m.push({...x,eventObject:_}),_=_.parent}}if("pointerId"in c&&f.internal.capturedMap.has(c.pointerId))for(let x of f.internal.capturedMap.get(c.pointerId).values())p.has(Pg(x.intersection))||m.push(x.intersection);return m}function r(c,u,f,p){const m=t.getState();if(c.length){const g={stopped:!1};for(const y of c){const b=dh(y.object)||m,{raycaster:w,pointer:x,camera:_,internal:S}=b,M=new H(x.x,x.y,0).unproject(_),E=k=>{var V,G;return(V=(G=S.capturedMap.get(k))==null?void 0:G.has(y.eventObject))!=null?V:!1},C=k=>{const V={intersection:y,target:u.target};S.capturedMap.has(k)?S.capturedMap.get(k).set(y.eventObject,V):S.capturedMap.set(k,new Map([[y.eventObject,V]])),u.target.setPointerCapture(k)},N=k=>{const V=S.capturedMap.get(k);V&&SO(S.capturedMap,y.eventObject,V,k)};let D={};for(let k in u){let V=u[k];typeof V!="function"&&(D[k]=V)}let R={...y,...D,pointer:x,intersections:c,stopped:g.stopped,delta:f,unprojectedPoint:M,ray:w.ray,camera:_,stopPropagation(){const k="pointerId"in u&&S.capturedMap.get(u.pointerId);if((!k||k.has(y.eventObject))&&(R.stopped=g.stopped=!0,S.hovered.size&&Array.from(S.hovered.values()).find(V=>V.eventObject===y.eventObject))){const V=c.slice(0,c.indexOf(y));s([...V,y])}},target:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:N},currentTarget:{hasPointerCapture:E,setPointerCapture:C,releasePointerCapture:N},nativeEvent:u};if(p(R),g.stopped===!0)break}}return c}function s(c){const{internal:u}=t.getState();for(const f of u.hovered.values())if(!c.length||!c.find(p=>p.object===f.object&&p.index===f.index&&p.instanceId===f.instanceId)){const m=f.eventObject.__r3f,g=m==null?void 0:m.handlers;if(u.hovered.delete(Pg(f)),m!=null&&m.eventCount){const y={...f,intersections:c};g.onPointerOut==null||g.onPointerOut(y),g.onPointerLeave==null||g.onPointerLeave(y)}}}function a(c,u){for(let f=0;f<u.length;f++){const p=u[f].__r3f;p==null||p.handlers.onPointerMissed==null||p.handlers.onPointerMissed(c)}}function o(c){switch(c){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return u=>{const{internal:f}=t.getState();"pointerId"in u&&f.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{f.capturedMap.has(u.pointerId)&&(f.capturedMap.delete(u.pointerId),s([]))})}}return function(f){const{onPointerMissed:p,internal:m}=t.getState();m.lastEvent.current=f;const g=c==="onPointerMove",y=c==="onClick"||c==="onContextMenu"||c==="onDoubleClick",w=i(f,g?n:void 0),x=y?e(f):0;c==="onPointerDown"&&(m.initialClick=[f.offsetX,f.offsetY],m.initialHits=w.map(S=>S.eventObject)),y&&!w.length&&x<=2&&(a(f,m.interaction),p&&p(f)),g&&s(w);function _(S){const M=S.eventObject,E=M.__r3f,C=E==null?void 0:E.handlers;if(E!=null&&E.eventCount)if(g){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const N=Pg(S),D=m.hovered.get(N);D?D.stopped&&S.stopPropagation():(m.hovered.set(N,S),C.onPointerOver==null||C.onPointerOver(S),C.onPointerEnter==null||C.onPointerEnter(S))}C.onPointerMove==null||C.onPointerMove(S)}else{const N=C[c];N?(!y||m.initialHits.includes(M))&&(a(f,m.interaction.filter(D=>!m.initialHits.includes(D))),N(S)):y&&m.initialHits.includes(M)&&a(f,m.interaction.filter(D=>!m.initialHits.includes(D)))}}r(w,f,x,_)}}return{handlePointer:o}}const AO=t=>!!(t!=null&&t.render),MO=I.createContext(null),ete=(t,e)=>{const n=jee((o,c)=>{const u=new H,f=new H,p=new H;function m(x=c().camera,_=f,S=c().size){const{width:M,height:E,top:C,left:N}=S,D=M/E;_.isVector3?p.copy(_):p.set(..._);const R=x.getWorldPosition(u).distanceTo(p);if(xO(x))return{width:M/x.zoom,height:E/x.zoom,top:C,left:N,factor:1,distance:R,aspect:D};{const k=x.fov*Math.PI/180,V=2*Math.tan(k/2)*R,G=V*(M/E);return{width:G,height:V,top:C,left:N,factor:M/G,distance:R,aspect:D}}}let g;const y=x=>o(_=>({performance:{..._.performance,current:x}})),b=new ye;return{set:o,get:c,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(x=1)=>t(c(),x),advance:(x,_)=>e(x,_,c()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new fM,pointer:b,mouse:b,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const x=c();g&&clearTimeout(g),x.performance.current!==x.performance.min&&y(x.performance.min),g=setTimeout(()=>y(c().performance.max),x.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:m},setEvents:x=>o(_=>({..._,events:{..._.events,...x}})),setSize:(x,_,S,M,E)=>{const C=c().camera,N={width:x,height:_,top:M||0,left:E||0,updateStyle:S};o(D=>({size:N,viewport:{...D.viewport,...m(C,f,N)}}))},setDpr:x=>o(_=>{const S=bO(x);return{viewport:{..._.viewport,dpr:S,initialDpr:_.viewport.initialDpr||S}}}),setFrameloop:(x="always")=>{const _=c().clock;_.stop(),_.elapsedTime=0,x!=="never"&&(_.start(),_.elapsedTime=0),o(()=>({frameloop:x}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:I.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(x,_,S)=>{const M=c().internal;return M.priority=M.priority+(_>0?1:0),M.subscribers.push({ref:x,priority:_,store:S}),M.subscribers=M.subscribers.sort((E,C)=>E.priority-C.priority),()=>{const E=c().internal;E!=null&&E.subscribers&&(E.priority=E.priority-(_>0?1:0),E.subscribers=E.subscribers.filter(C=>C.ref!==x))}}}}}),i=n.getState();let r=i.size,s=i.viewport.dpr,a=i.camera;return n.subscribe(()=>{const{camera:o,size:c,viewport:u,gl:f,set:p}=n.getState();if(c.width!==r.width||c.height!==r.height||u.dpr!==s){var m;r=c,s=u.dpr,Qee(o,c),f.setPixelRatio(u.dpr);const g=(m=c.updateStyle)!=null?m:typeof HTMLCanvasElement<"u"&&f.domElement instanceof HTMLCanvasElement;f.setSize(c.width,c.height,g)}o!==a&&(a=o,p(g=>({viewport:{...g.viewport,...g.viewport.getCurrentViewport(o)}})))}),n.subscribe(o=>t(o)),n};let Ng,tte=new Set,nte=new Set,ite=new Set;function nb(t,e){if(t.size)for(const{callback:n}of t.values())n(e)}function hh(t,e){switch(t){case"before":return nb(tte,e);case"after":return nb(nte,e);case"tail":return nb(ite,e)}}let ib,rb;function sb(t,e,n){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof t=="number"&&(i=t-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=t),ib=e.internal.subscribers,Ng=0;Ng<ib.length;Ng++)rb=ib[Ng],rb.ref.current(rb.store.getState(),i,n);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}function rte(t){let e=!1,n=!1,i,r,s;function a(u){r=requestAnimationFrame(a),e=!0,i=0,hh("before",u),n=!0;for(const p of t.values()){var f;s=p.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((f=s.gl.xr)!=null&&f.isPresenting)&&(i+=sb(u,s))}if(n=!1,hh("after",u),i===0)return hh("tail",u),e=!1,cancelAnimationFrame(r)}function o(u,f=1){var p;if(!u)return t.forEach(m=>o(m.store.getState(),f));(p=u.gl.xr)!=null&&p.isPresenting||!u.internal.active||u.frameloop==="never"||(f>1?u.internal.frames=Math.min(60,u.internal.frames+f):n?u.internal.frames=2:u.internal.frames=1,e||(e=!0,requestAnimationFrame(a)))}function c(u,f=!0,p,m){if(f&&hh("before",u),p)sb(u,p,m);else for(const g of t.values())sb(u,g.store.getState());f&&hh("after",u)}return{loop:a,invalidate:o,advance:c}}function ste(){const t=I.useContext(MO);if(!t)throw new Error("R3F: Hooks can only be used within the Canvas component!");return t}function ate(t,e=0){const n=ste(),i=n.getState().internal.subscribe,r=yO(t);return pp(()=>i(r,e,n),[e,i,n]),null}const ad=new Map,{invalidate:JN,advance:eR}=rte(ad),{reconciler:$x,applyProps:Jc}=Wee(ad,Kee),eu={objects:"shallow",strict:!1},ote=(t,e)=>{const n=typeof t=="function"?t(e):t;return AO(n)?n:new YA({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...t})};function lte(t,e){const n=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:a,updateStyle:o=n}=e;return{width:i,height:r,top:s,left:a,updateStyle:o}}else if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement&&t.parentElement){const{width:i,height:r,top:s,left:a}=t.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:a,updateStyle:n}}else if(typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas)return{width:t.width,height:t.height,top:0,left:0,updateStyle:n};return{width:0,height:0,top:0,left:0}}function cte(t){const e=ad.get(t),n=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||ete(JN,eR),a=n||$x.createContainer(s,Mu.ConcurrentRoot,null,!1,null,"",r,null);e||ad.set(t,{fiber:a,store:s});let o,c=!1,u;return{configure(f={}){let{gl:p,size:m,scene:g,events:y,onCreated:b,shadows:w=!1,linear:x=!1,flat:_=!1,legacy:S=!1,orthographic:M=!1,frameloop:E="always",dpr:C=[1,2],performance:N,raycaster:D,camera:R,onPointerMissed:k}=f,V=s.getState(),G=V.gl;V.gl||V.set({gl:G=ote(p,t)});let ie=V.raycaster;ie||V.set({raycaster:ie=new uO});const{params:z,...$}=D||{};if(on.equ($,ie,eu)||Jc(ie,{...$}),on.equ(z,ie.params,eu)||Jc(ie,{params:{...ie.params,...z}}),!V.camera||V.camera===u&&!on.equ(u,R,eu)){u=R;const B=R instanceof sp,Y=B?R:M?new cp(0,0,0,0,.1,1e3):new si(75,0,.1,1e3);B||(Y.position.z=5,R&&(Jc(Y,R),("aspect"in R||"left"in R||"right"in R||"bottom"in R||"top"in R)&&(Y.manual=!0,Y.updateProjectionMatrix())),!V.camera&&!(R!=null&&R.rotation)&&Y.lookAt(0,0,0)),V.set({camera:Y}),ie.camera=Y}if(!V.scene){let B;g!=null&&g.isScene?B=g:(B=new QA,g&&Jc(B,g)),V.set({scene:tu(B)})}if(!V.xr){var X;const B=(K,se)=>{const ge=s.getState();ge.frameloop!=="never"&&eR(K,!0,ge,se)},Y=()=>{const K=s.getState();K.gl.xr.enabled=K.gl.xr.isPresenting,K.gl.xr.setAnimationLoop(K.gl.xr.isPresenting?B:null),K.gl.xr.isPresenting||JN(K)},Z={connect(){const K=s.getState().gl;K.xr.addEventListener("sessionstart",Y),K.xr.addEventListener("sessionend",Y)},disconnect(){const K=s.getState().gl;K.xr.removeEventListener("sessionstart",Y),K.xr.removeEventListener("sessionend",Y)}};typeof((X=G.xr)==null?void 0:X.addEventListener)=="function"&&Z.connect(),V.set({xr:Z})}if(G.shadowMap){const B=G.shadowMap.enabled,Y=G.shadowMap.type;if(G.shadowMap.enabled=!!w,on.boo(w))G.shadowMap.type=Dh;else if(on.str(w)){var ee;const Z={basic:nF,percentage:Dy,soft:Dh,variance:ss};G.shadowMap.type=(ee=Z[w])!=null?ee:Dh}else on.obj(w)&&Object.assign(G.shadowMap,w);(B!==G.shadowMap.enabled||Y!==G.shadowMap.type)&&(G.shadowMap.needsUpdate=!0)}const L=gO();L&&("enabled"in L?L.enabled=!S:"legacyMode"in L&&(L.legacyMode=S)),c||Jc(G,{outputEncoding:x?3e3:3001,toneMapping:_?Ws:CA}),V.legacy!==S&&V.set(()=>({legacy:S})),V.linear!==x&&V.set(()=>({linear:x})),V.flat!==_&&V.set(()=>({flat:_})),p&&!on.fun(p)&&!AO(p)&&!on.equ(p,G,eu)&&Jc(G,p),y&&!V.events.handlers&&V.set({events:y(s)});const j=lte(t,m);return on.equ(j,V.size,eu)||V.setSize(j.width,j.height,j.updateStyle,j.top,j.left),C&&V.viewport.dpr!==bO(C)&&V.setDpr(C),V.frameloop!==E&&V.setFrameloop(E),V.onPointerMissed||V.set({onPointerMissed:k}),N&&!on.equ(N,V.performance,eu)&&V.set(B=>({performance:{...B.performance,...N}})),o=b,c=!0,this},render(f){return c||this.configure(),$x.updateContainer(l.jsx(ute,{store:s,children:f,onCreated:o,rootElement:t}),a,null,()=>{}),s},unmount(){TO(t)}}}function ute({store:t,children:e,onCreated:n,rootElement:i}){return pp(()=>{const r=t.getState();r.set(s=>({internal:{...s.internal,active:!0}})),n&&n(r),t.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),l.jsx(MO.Provider,{value:t,children:e})}function TO(t,e){const n=ad.get(t),i=n==null?void 0:n.fiber;if(i){const r=n==null?void 0:n.store.getState();r&&(r.internal.active=!1),$x.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,a,o,c;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(a=s.renderLists)==null||a.dispose==null||a.dispose(),(o=r.gl)==null||o.forceContextLoss==null||o.forceContextLoss(),(c=r.gl)!=null&&c.xr&&r.xr.disconnect(),$ee(r),ad.delete(t)}catch{}},500)})}}$x.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:I.version});const ab={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function dte(t){const{handlePointer:e}=Jee(t);return{priority:1,enabled:!0,compute(n,i,r){i.pointer.set(n.offsetX/i.size.width*2-1,-(n.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(ab).reduce((n,i)=>({...n,[i]:e(i)}),{}),update:()=>{var n;const{events:i,internal:r}=t.getState();(n=r.lastEvent)!=null&&n.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:n=>{var i;const{set:r,events:s}=t.getState();s.disconnect==null||s.disconnect(),r(a=>({events:{...a.events,connected:n}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([a,o])=>{const[c,u]=ab[a];n.addEventListener(c,o,{passive:u})})},disconnect:()=>{const{set:n,events:i}=t.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,a])=>{if(i&&i.connected instanceof HTMLElement){const[o]=ab[s];i.connected.removeEventListener(o,a)}}),n(s=>({events:{...s.events,connected:void 0}}))}}}}function tR(t,e){let n;return(...i)=>{window.clearTimeout(n),n=window.setTimeout(()=>t(...i),e)}}function hte({debounce:t,scroll:e,polyfill:n,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const r=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!r)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[s,a]=I.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),o=I.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),c=t?typeof t=="number"?t:t.scroll:null,u=t?typeof t=="number"?t:t.resize:null,f=I.useRef(!1);I.useEffect(()=>(f.current=!0,()=>void(f.current=!1)));const[p,m,g]=I.useMemo(()=>{const x=()=>{if(!o.current.element)return;const{left:_,top:S,width:M,height:E,bottom:C,right:N,x:D,y:R}=o.current.element.getBoundingClientRect(),k={left:_,top:S,width:M,height:E,bottom:C,right:N,x:D,y:R};o.current.element instanceof HTMLElement&&i&&(k.height=o.current.element.offsetHeight,k.width=o.current.element.offsetWidth),Object.freeze(k),f.current&&!gte(o.current.lastBounds,k)&&a(o.current.lastBounds=k)};return[x,u?tR(x,u):x,c?tR(x,c):x]},[a,i,c,u]);function y(){o.current.scrollContainers&&(o.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",g,!0)),o.current.scrollContainers=null),o.current.resizeObserver&&(o.current.resizeObserver.disconnect(),o.current.resizeObserver=null),o.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",o.current.orientationHandler))}function b(){o.current.element&&(o.current.resizeObserver=new r(g),o.current.resizeObserver.observe(o.current.element),e&&o.current.scrollContainers&&o.current.scrollContainers.forEach(x=>x.addEventListener("scroll",g,{capture:!0,passive:!0})),o.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",o.current.orientationHandler))}const w=x=>{!x||x===o.current.element||(y(),o.current.element=x,o.current.scrollContainers=EO(x),b())};return pte(g,!!e),fte(m),I.useEffect(()=>{y(),b()},[e,g,m]),I.useEffect(()=>y,[]),[w,s,p]}function fte(t){I.useEffect(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function pte(t,e){I.useEffect(()=>{if(e){const n=t;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[t,e])}function EO(t){const e=[];if(!t||t===document.body)return e;const{overflow:n,overflowX:i,overflowY:r}=window.getComputedStyle(t);return[n,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(t),[...e,...EO(t.parentElement)]}const mte=["x","y","top","bottom","left","right","width","height"],gte=(t,e)=>mte.every(n=>t[n]===e[n]);var xte=Object.defineProperty,yte=Object.defineProperties,vte=Object.getOwnPropertyDescriptors,nR=Object.getOwnPropertySymbols,wte=Object.prototype.hasOwnProperty,bte=Object.prototype.propertyIsEnumerable,iR=(t,e,n)=>e in t?xte(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rR=(t,e)=>{for(var n in e||(e={}))wte.call(e,n)&&iR(t,n,e[n]);if(nR)for(var n of nR(e))bte.call(e,n)&&iR(t,n,e[n]);return t},_te=(t,e)=>yte(t,vte(e)),sR,aR;typeof window<"u"&&((sR=window.document)!=null&&sR.createElement||((aR=window.navigator)==null?void 0:aR.product)==="ReactNative")?I.useLayoutEffect:I.useEffect;function CO(t,e,n){if(!t)return;if(n(t)===!0)return t;let i=t.child;for(;i;){const r=CO(i,e,n);if(r)return r;i=i.sibling}}function PO(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const oR=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=oR;return}return oR.apply(this,arguments)};const yM=PO(I.createContext(null));class NO extends I.Component{render(){return I.createElement(yM.Provider,{value:this._reactInternals},this.props.children)}}function Ste(){const t=I.useContext(yM);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=I.useId();return I.useMemo(()=>{for(const i of[t,t==null?void 0:t.alternate]){if(!i)continue;const r=CO(i,!1,s=>{let a=s.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(r)return r}},[t,e])}function Ate(){const t=Ste(),[e]=I.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&typeof n.type=="object"){const r=n.type._context===void 0&&n.type.Provider===n.type?n.type:n.type._context;r&&r!==yM&&!e.has(r)&&e.set(r,I.useContext(PO(r)))}n=n.return}return e}function Mte(){const t=Ate();return I.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>i=>I.createElement(e,null,I.createElement(n.Provider,_te(rR({},i),{value:t.get(n)}))),e=>I.createElement(NO,rR({},e))),[t])}const Tte=I.forwardRef(function({children:e,fallback:n,resize:i,style:r,gl:s,events:a=dte,eventSource:o,eventPrefix:c,shadows:u,linear:f,flat:p,legacy:m,orthographic:g,frameloop:y,dpr:b,performance:w,raycaster:x,camera:_,scene:S,onPointerMissed:M,onCreated:E,...C},N){I.useMemo(()=>Hee(Lee),[]);const D=Mte(),[R,k]=hte({scroll:!0,debounce:{scroll:50,resize:0},...i}),V=I.useRef(null),G=I.useRef(null);I.useImperativeHandle(N,()=>V.current);const ie=yO(M),[z,$]=I.useState(!1),[X,ee]=I.useState(!1);if(z)throw z;if(X)throw X;const L=I.useRef(null);pp(()=>{const B=V.current;k.width>0&&k.height>0&&B&&(L.current||(L.current=cte(B)),L.current.configure({gl:s,events:a,shadows:u,linear:f,flat:p,legacy:m,orthographic:g,frameloop:y,dpr:b,performance:w,raycaster:x,camera:_,scene:S,size:k,onPointerMissed:(...Y)=>ie.current==null?void 0:ie.current(...Y),onCreated:Y=>{Y.events.connect==null||Y.events.connect(o?Gee(o)?o.current:o:G.current),c&&Y.setEvents({compute:(Z,K)=>{const se=Z[c+"X"],ge=Z[c+"Y"];K.pointer.set(se/K.size.width*2-1,-(ge/K.size.height)*2+1),K.raycaster.setFromCamera(K.pointer,K.camera)}}),E==null||E(Y)}}),L.current.render(l.jsx(D,{children:l.jsx(vO,{set:ee,children:l.jsx(I.Suspense,{fallback:l.jsx(qee,{set:$}),children:e??null})})})))}),I.useEffect(()=>{const B=V.current;if(B)return()=>TO(B)},[]);const j=o?"none":"auto";return l.jsx("div",{ref:G,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:j,...r},...C,children:l.jsx("div",{ref:R,style:{width:"100%",height:"100%"},children:l.jsx("canvas",{ref:V,style:{display:"block"},children:n})})})}),Ete=I.forwardRef(function(e,n){return l.jsx(NO,{children:l.jsx(Tte,{...e,ref:n})})}),ob=768;function Cte(){const[t,e]=I.useState(void 0);return I.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ob-1}px)`),i=()=>{e(window.innerWidth<ob)};return n.addEventListener("change",i),e(window.innerWidth<ob),()=>n.removeEventListener("change",i)},[]),!!t}const ha=300,Pte=2.5,lR=.9,Nte=.4,Rte=({scaleFactor:t})=>{const e=I.useRef(null),n=I.useRef(null),i=I.useRef(null),r=I.useMemo(()=>{const g=new Float32Array(ha*3),y=new Float32Array(ha*3),b=new Ue("#FF3478"),w=new Ue("#FF4D2A"),x=new Ue("#240AFF");for(let _=0;_<ha;_++){const S=Math.acos(2*Math.random()-1),M=Math.random()*Math.PI*2,E=Pte*(.85+Math.random()*.15);g[_*3]=E*Math.sin(S)*Math.cos(M),g[_*3+1]=E*Math.sin(S)*Math.sin(M),g[_*3+2]=E*Math.cos(S);const C=Math.random(),N=C<.2?x:C<.5?w:b;y[_*3]=N.r,y[_*3+1]=N.g,y[_*3+2]=N.b}return{positions:g,colors:y}},[]),s=ha*6,a=ha*3,o=I.useMemo(()=>new Float32Array(s*6),[s]),c=I.useMemo(()=>new Float32Array(s*6),[s]),u=I.useMemo(()=>new Float32Array(a*3),[a]),f=I.useMemo(()=>{const g=new Float32Array(a);for(let y=0;y<a;y++)g[y]=Math.random();return g},[a]),p=I.useMemo(()=>{const g=new At;return g.setAttribute("position",new qt(o,3)),g.setAttribute("color",new qt(c,3)),g.setDrawRange(0,0),g},[o,c]),m=I.useMemo(()=>{const g=new At;return g.setAttribute("position",new qt(u,3)),g.setDrawRange(0,0),g},[u]);return ate(({clock:g})=>{if(!e.current)return;e.current.rotation.y=g.elapsedTime*.08,e.current.rotation.x=Math.sin(g.elapsedTime*.05)*.1;const y=r.positions;let b=0,w=0;const x=g.elapsedTime,_=new Ue("#FF4D2A");for(let S=0;S<ha;S++){const M=y[S*3],E=y[S*3+1],C=y[S*3+2];for(let N=S+1;N<ha;N++){const D=y[N*3],R=y[N*3+1],k=y[N*3+2],V=M-D,G=E-R,ie=C-k,z=Math.sqrt(V*V+G*G+ie*ie);if(z<lR&&b<s){const $=1-z/lR,X=b*6;if(o[X]=M,o[X+1]=E,o[X+2]=C,o[X+3]=D,o[X+4]=R,o[X+5]=k,c[X]=_.r*$,c[X+1]=_.g*$,c[X+2]=_.b*$,c[X+3]=_.r*$,c[X+4]=_.g*$,c[X+5]=_.b*$,b++,w<a){const ee=f[w],L=(x*Nte+ee)%1;u[w*3]=M+(D-M)*L,u[w*3+1]=E+(R-E)*L,u[w*3+2]=C+(k-C)*L,w++}}}}p.setDrawRange(0,b*2),p.attributes.position.needsUpdate=!0,p.attributes.color.needsUpdate=!0,m.setDrawRange(0,w),m.attributes.position.needsUpdate=!0}),l.jsxs("group",{ref:e,scale:t,children:[l.jsxs("points",{children:[l.jsxs("bufferGeometry",{children:[l.jsx("bufferAttribute",{attach:"attributes-position",array:r.positions,count:ha,itemSize:3}),l.jsx("bufferAttribute",{attach:"attributes-color",array:r.colors,count:ha,itemSize:3})]}),l.jsx("pointsMaterial",{size:.04,vertexColors:!0,transparent:!0,opacity:.9,sizeAttenuation:!0,depthWrite:!1})]}),l.jsx("lineSegments",{ref:n,geometry:p,children:l.jsx("lineBasicMaterial",{vertexColors:!0,transparent:!0,opacity:.3,depthWrite:!1})}),l.jsx("points",{ref:i,geometry:m,children:l.jsx("pointsMaterial",{size:.06,color:"#FF4D2A",transparent:!0,opacity:.8,sizeAttenuation:!0,depthWrite:!1})})]})},Ite=()=>{const e=Cte()?.6:1;return l.jsxs("section",{className:"relative w-full h-screen overflow-hidden",style:{background:"#150835",fontFamily:"Quicksand, sans-serif"},children:[l.jsx("div",{className:"absolute inset-0 z-0",children:l.jsxs(Ete,{camera:{position:[0,0,6],fov:60},dpr:[1,1.5],gl:{antialias:!0,alpha:!1},style:{background:"#150835"},children:[l.jsx("ambientLight",{intensity:.5}),l.jsx(Rte,{scaleFactor:e})]})}),l.jsx("div",{className:"relative z-10 flex items-center justify-center h-full px-6",children:l.jsx(me.h1,{className:"text-4xl md:text-6xl lg:text-7xl font-light text-white text-center max-w-4xl leading-tight",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.3,ease:"easeOut"},children:"Conversational AI Architects"})}),l.jsxs(me.h2,{className:"absolute bottom-24 right-10 z-10 text-white/60 text-xs md:text-sm uppercase tracking-[0.35em] font-medium text-right",initial:{opacity:0},animate:{opacity:1},transition:{duration:.8,delay:.6},children:[l.jsx("span",{className:"block",children:"Decoding"}),l.jsx("span",{className:"block",children:"Human"}),l.jsx("span",{className:"block",children:"Conversations"})]})]})},kte=()=>l.jsxs("div",{className:"flex flex-col h-full p-3 overflow-hidden text-[11px]",children:[l.jsx("div",{className:"flex items-center gap-2 mb-2 px-1",children:[{Icon:RB,label:"WhatsApp"},{Icon:IB,label:"Phone Call"},{Icon:y3,label:"Support Ticket"}].map(({Icon:t,label:e},n)=>l.jsxs(me.div,{className:"flex items-center gap-1.5 text-white/50",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{delay:n*.12},children:[l.jsx(t,{size:13}),l.jsx("span",{className:"text-[10px] uppercase tracking-wider",children:e})]},e))}),l.jsxs(me.div,{className:"flex items-center justify-between bg-white/5 rounded-lg px-2.5 py-1.5 mb-2",initial:{opacity:0},animate:{opacity:1},transition:{delay:.3},children:[l.jsx("span",{className:"text-white/60 text-[11px]",children:"Agent: Laura M."}),l.jsx("span",{className:"text-white/30 text-[11px]",children:"#CX-4891"})]}),l.jsxs(me.div,{className:"self-start max-w-[85%] bg-white/10 rounded-xl rounded-tl-sm px-2.5 py-2 mb-1 text-white/80 leading-relaxed",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.5,duration:.4},children:["Hi. This is"," ",l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(255,52,120,0.35)"},transition:{delay:1.2,duration:.4},children:"so frustrating"}),". I added my spouse to my account, but their email isn't working. The"," ",l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(255,52,120,0.35)"},transition:{delay:1.6,duration:.4},children:"bot's instructions were confusing"})," ","and didn't help at all."]}),l.jsx("div",{className:"flex gap-1.5 ml-1 mb-2",children:[{label:"FRUSTRATION",delay:1.8},{label:"BOT FAILURE",delay:2.2}].map(t=>l.jsx(me.span,{className:"px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider text-white",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"},initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},transition:{delay:t.delay,type:"spring",stiffness:200},children:t.label},t.label))}),l.jsxs(me.div,{className:"self-end max-w-[85%] bg-white/15 rounded-xl rounded-tr-sm px-2.5 py-2 mb-1 text-white/80 leading-relaxed",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.9,duration:.4},children:[l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(74,222,128,0.3)"},transition:{delay:2.6,duration:.4},children:"Sorry about this!"})," ","I've checked our system and there's no account for that email. Is there another email you may have used?"]}),l.jsx("div",{className:"flex justify-end mr-1 mb-2",children:l.jsx(me.span,{className:"px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider text-white bg-emerald-500/80",initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},transition:{delay:3,type:"spring",stiffness:200},children:"APOLOGY"})}),l.jsxs(me.div,{className:"self-start max-w-[85%] bg-white/10 rounded-xl rounded-tl-sm px-2.5 py-2 mb-1 text-white/80 leading-relaxed",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:3.4,duration:.4},children:["Yes, try john.doe@gmail.com. Also, I've been"," ",l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(255,52,120,0.35)"},transition:{delay:4.2,duration:.4},children:"waiting 3 days"})," ","for a callback that was"," ",l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(255,52,120,0.35)"},transition:{delay:4.6,duration:.4},children:"never scheduled"}),"."]}),l.jsx("div",{className:"flex gap-1.5 ml-1 mb-2",children:[{label:"DELAYED RESPONSE",delay:4.8,bg:"linear-gradient(90deg, #FF3478, #FF4D2A)"},{label:"SLA BREACH",delay:5.2,bg:"linear-gradient(90deg, #F59E0B, #EAB308)"}].map(t=>l.jsx(me.span,{className:"px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider text-white",style:{background:t.bg},initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},transition:{delay:t.delay,type:"spring",stiffness:200},children:t.label},t.label))}),l.jsxs(me.div,{className:"self-end max-w-[85%] bg-white/15 rounded-xl rounded-tr-sm px-2.5 py-2 mb-1 text-white/80 leading-relaxed",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:3.8,duration:.4},children:["I completely understand your frustration. Let me"," ",l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(96,165,250,0.35)"},transition:{delay:5.6,duration:.4},children:"escalate this to our priority team"})," ","right away and get this"," ",l.jsx(me.span,{className:"rounded px-0.5",initial:{backgroundColor:"transparent"},animate:{backgroundColor:"rgba(74,222,128,0.3)"},transition:{delay:6,duration:.4},children:"resolved today"}),"."]}),l.jsx("div",{className:"flex justify-end gap-1.5 mr-1",children:[{label:"ESCALATION",delay:6.2,bg:"linear-gradient(90deg, #3B82F6, #60A5FA)"},{label:"RESOLUTION COMMIT",delay:6.4,bg:"linear-gradient(90deg, #22C55E, #4ADE80)"}].map(t=>l.jsx(me.span,{className:"px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider text-white",style:{background:t.bg},initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},transition:{delay:t.delay,type:"spring",stiffness:200},children:t.label},t.label))})]}),Lte=[{source:"WhatsApp",SourceIcon:xy,sourceColor:"#25D366",contact:"+34 667 460 712",status:"finished",alert:!0,duration:"20.7 min",processingTags:[{label:"Extraction",ok:!0},{label:"Summary",ok:!0},{label:"Valid",ok:!0}],classificationTags:[{label:"Very Unsatisfied",color:"#FF3478"},{label:"Urgent",color:"#EF4444"}],baseDelay:.3},{source:"Call Center",SourceIcon:SB,sourceColor:"#3B82F6",contact:"+34 605 512 387",status:"finished",alert:!0,duration:"1.0 min",processingTags:[{label:"Extraction",ok:!0},{label:"Summary",ok:!0},{label:"Voicemail",ok:!1}],classificationTags:[{label:"Unresolved",color:"#F59E0B"}],baseDelay:1.5},{source:"Zendesk",SourceIcon:gy,sourceColor:"#F97316",contact:"Ticket #ZD-8841",status:"finished",alert:!1,duration:"5.2 min",processingTags:[{label:"Extraction",ok:!0},{label:"Summary",ok:!0},{label:"Valid",ok:!0}],classificationTags:[{label:"Satisfied",color:"#22C55E"},{label:"Resolved",color:"#4ADE80"}],baseDelay:2.8}],Dte=()=>l.jsx("div",{className:"flex flex-col gap-1.5 p-3 h-full overflow-hidden text-[11px]",children:Lte.map((t,e)=>{const n=["Sent to Sales Key Account","Sent to Slack","Sent to IT Support"];return l.jsxs(me.div,{className:"bg-white/5 rounded-lg p-2 border border-white/10 flex flex-col gap-1",initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{delay:t.baseDelay,duration:.4,ease:"easeOut"},children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(t.SourceIcon,{size:15,style:{color:t.sourceColor}}),l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-white/40",children:t.source}),l.jsx("span",{className:"text-white/70 font-medium ml-1",children:t.contact}),l.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[l.jsx("span",{className:"px-1.5 py-0.5 rounded text-[9px] bg-white/10 text-white/50",children:t.status}),t.alert&&l.jsx(me.span,{className:"px-1.5 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider text-white",style:{background:"#EF4444"},initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{delay:t.baseDelay+.3,type:"spring",stiffness:200},children:"ALERT"})]})]}),l.jsx(me.div,{className:"flex items-center gap-2 text-white/30",initial:{opacity:0},animate:{opacity:1},transition:{delay:t.baseDelay+.2},children:l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(g3,{size:9})," ",t.duration]})}),l.jsx("div",{className:"flex flex-wrap gap-1",children:t.processingTags.map((i,r)=>l.jsxs(me.span,{className:"flex items-center gap-1 px-2 py-0.5 rounded-full text-[9px] font-semibold text-white/80 bg-white/10",initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},transition:{delay:t.baseDelay+.5+r*.2,type:"spring",stiffness:200},children:[i.label,i.ok?l.jsx(p3,{size:8,className:"text-emerald-400"}):l.jsx(nc,{size:8,className:"text-red-400"})]},i.label))}),l.jsx("div",{className:"flex flex-wrap gap-1",children:t.classificationTags.map((i,r)=>l.jsx(me.span,{className:"px-2 py-0.5 rounded-full text-[9px] font-bold uppercase tracking-wider text-white",style:{background:i.color},initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:t.baseDelay+1.1+r*.2,type:"spring",stiffness:180},children:i.label},i.label))}),l.jsxs(me.div,{className:"flex items-center gap-1.5 mt-0.5",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:t.baseDelay+1.5,duration:.3,ease:"easeOut"},children:[l.jsx(PS,{size:10,className:"text-emerald-400"}),l.jsx("span",{className:"text-[10px] text-emerald-400/80 font-medium",children:n[e]})]})]},e)})}),Fte=()=>{const t=[{label:"Sentiment",value:"-0.60",sublabel:"Muy Negativo",color:"#EF4444",delay:.2},{label:"Urgency",value:"4/5",sublabel:"Alta",color:"#F59E0B",delay:.4},{label:"Escalation Risk",value:"85%",sublabel:"Muy Alto",color:"#EF4444",delay:.6},{label:"Human Review",value:"REQUIRED",sublabel:"",color:"#FACC15",delay:.8}],e=[{label:"CRM Updated",detail:"Salesforce synced",color:"#4ADE80",time:"Just now",delay:1},{label:"Slack Alert Sent",detail:"#cx-alerts channel",color:"#60A5FA",time:"2s ago",delay:1.4},{label:"Ticket Created",detail:"Zendesk #ZD-8842",color:"#FACC15",time:"5s ago",delay:1.8}];return l.jsxs("div",{className:"flex flex-col h-full p-3 overflow-hidden text-[10px] gap-2",children:[l.jsx("div",{className:"grid grid-cols-2 gap-2",children:t.map(n=>l.jsxs(me.div,{className:"bg-white/5 border border-white/10 rounded-lg p-2 flex flex-col gap-1",initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:n.delay,type:"spring",stiffness:160},children:[l.jsx("span",{className:"text-[9px] uppercase tracking-wider text-white/40",children:n.label}),l.jsx("span",{className:"text-sm font-bold",style:{color:n.color},children:n.value}),n.sublabel&&l.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-wider",style:{color:n.color+"CC"},children:n.sublabel}),n.label==="Escalation Risk"&&l.jsx("div",{className:"h-1.5 rounded-full bg-white/10 overflow-hidden mt-0.5",children:l.jsx(me.div,{className:"h-full rounded-full",style:{background:n.color},initial:{width:0},animate:{width:"85%"},transition:{delay:n.delay+.3,duration:.8,ease:"easeOut"}})}),n.label==="Urgency"&&l.jsx("div",{className:"flex gap-1 mt-0.5",children:[1,2,3,4,5].map(i=>l.jsx(me.span,{className:"w-1.5 h-1.5 rounded-full",style:{background:i<=4?n.color:"rgba(255,255,255,0.15)"},initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:n.delay+.2+i*.08}},i))})]},n.label))}),l.jsx("div",{className:"flex flex-col gap-1.5",children:e.map(n=>l.jsxs(me.div,{className:"flex items-center gap-2.5 bg-white/5 border border-white/10 rounded-lg px-2.5 py-1.5",initial:{opacity:0,x:40},animate:{opacity:1,x:0},transition:{delay:n.delay,type:"spring",stiffness:120},children:[l.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:n.color}}),l.jsxs("div",{className:"flex flex-col",children:[l.jsx("span",{className:"text-[11px] font-semibold text-white/80",children:n.label}),l.jsx("span",{className:"text-[9px] text-white/40",children:n.detail})]}),l.jsx("span",{className:"ml-auto text-[9px] text-white/25 shrink-0",children:n.time})]},n.label))}),l.jsx(me.div,{className:"rounded-xl p-[1.5px] mt-auto",style:{background:"linear-gradient(135deg, #FF3478, #FF4D2A, #FF8C00)"},initial:{opacity:0,scale:.85},animate:{opacity:1,scale:1},transition:{delay:2.2,type:"spring",stiffness:140},children:l.jsxs("div",{className:"bg-[#1a0a3e] rounded-[10px] px-2.5 py-2 flex items-start gap-2.5",children:[l.jsx(me.div,{className:"mt-0.5 shrink-0",animate:{boxShadow:["0 0 8px rgba(255,52,120,0.4)","0 0 20px rgba(255,52,120,0.7)","0 0 8px rgba(255,52,120,0.4)"]},transition:{duration:2,repeat:1/0},style:{borderRadius:"50%"},children:l.jsx(gy,{size:16,className:"text-pink-400"})}),l.jsxs("div",{className:"flex flex-col gap-0.5",children:[l.jsx("span",{className:"text-[12px] font-bold text-white",children:"QuickWins Sent by Email to CX Team"}),l.jsx("span",{className:"text-[9px] text-white/50",children:"3 actionable items delivered to cx-team@company.com"})]}),l.jsx(PS,{size:12,className:"text-white/30 shrink-0 ml-auto mt-1"})]})})]})},jte=()=>{const t=[{category:"Concern",count:"5.4K",color:"#FF4D4D",desc:"Recurring negative quote errors causing frustration"},{category:"Opportunity",count:"783",color:"#4D8BFF",desc:"Webinar form questions acting as alert system"},{category:"Positive",count:"563",color:"#34D399",desc:"Real-time verification praised by customers"},{category:"Neutral",count:"94",color:"#9CA3AF",desc:"Standard procedure inquiries"}],e=[{name:"Sales",icon:DB,count:12,delay:1.4},{name:"Operations",icon:f3,count:8,delay:1.8},{name:"IT",icon:LB,count:5,delay:2.2},{name:"Marketing",icon:gy,count:6,delay:2.6},{name:"Product",icon:sf,count:9,delay:3},{name:"Customer Experience",icon:y3,count:7,delay:3.4}];return l.jsxs("div",{className:"flex flex-col h-full p-3 overflow-hidden text-[12px]",children:[l.jsx("div",{className:"grid grid-cols-2 gap-1.5 mb-2",children:t.map((n,i)=>l.jsxs(me.div,{className:"rounded-lg p-2 bg-white/5",style:{borderLeft:`3px solid ${n.color}`},initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{delay:.2+i*.2,duration:.4},children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-white/50",children:n.category}),l.jsx("span",{className:"text-[12px] font-bold text-white",children:n.count})]}),l.jsx("p",{className:"text-[9px] text-white/40 leading-tight",children:n.desc})]},n.category))}),l.jsxs(me.div,{className:"rounded-lg px-3 py-1.5 mb-2 flex items-center gap-2",style:{background:"linear-gradient(90deg, rgba(52,211,153,0.15), rgba(52,211,153,0.05))"},initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:1,duration:.5},children:[l.jsx(sf,{size:12,className:"text-emerald-400 shrink-0"}),l.jsx("span",{className:"text-[11px] font-medium text-emerald-300",children:"Quick Wins — 6 Immediate Impact Actions"})]}),l.jsx("div",{className:"flex flex-col gap-2",children:e.map(n=>l.jsxs("div",{className:"relative flex items-center gap-2 h-6",children:[l.jsx(me.div,{className:"absolute left-0 top-1/2 h-[2px] -translate-y-1/2",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",width:"70%",transformOrigin:"left"},initial:{scaleX:0},animate:{scaleX:1},transition:{delay:n.delay,duration:.6,ease:"easeOut"}}),l.jsx(me.span,{className:"absolute top-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full bg-[#FF3478] shadow-[0_0_6px_#FF3478]",initial:{left:"0%",opacity:0},animate:{left:"70%",opacity:[0,1,1,0]},transition:{delay:n.delay,duration:.6,ease:"easeOut"}}),l.jsxs(me.div,{className:"ml-auto flex items-center gap-1.5 bg-white/10 rounded-full px-2.5 py-1 z-10",initial:{opacity:0},animate:{opacity:1},transition:{delay:n.delay+.4,duration:.3},children:[l.jsx(n.icon,{size:11,className:"text-white/60"}),l.jsx("span",{className:"text-[10px] font-medium text-white/80",children:n.name}),l.jsx("span",{className:"text-[10px] text-[#FF3478] font-bold",children:n.count})]})]},n.name))}),l.jsxs(me.div,{className:"flex items-center gap-1.5 justify-center mt-2",initial:{opacity:0},animate:{opacity:1},transition:{delay:4,duration:.4},children:[l.jsx(p3,{size:11,className:"text-emerald-400"}),l.jsx("span",{className:"text-[10px] text-emerald-400/70",children:"All insights delivered"})]})]})},cR=[{title:"Eradicate Blind Spots",value:"Stop operating on assumptions. Gain a deep, unvarnished understanding of your business and discover exactly what your customers and partners truly experience.",tickers:["// DEEP_UNDERSTANDING","// ZERO_BLIND_SPOTS"],Mockup:kte},{title:"Action Plans, Not Analytics",value:"We don't sell charts or dashboard fatigue. We do the heavy lifting to deliver actionable insights and evidence-based roadmaps so your team knows exactly what to execute next.",tickers:["// ACTIONABLE_INSIGHTS","// DETERMINISTIC_PLANS"],Mockup:Dte},{title:"Accelerate Time-to-Execution",value:"Speed up your business without the technical hassle. Drastically reduce your time-to-insight and time-to-execution, moving from problem discovery to real-world resolution instantly.",tickers:["// RAPID_DEPLOYMENT","// FRICTIONLESS_ROI"],Mockup:Fte},{title:"Cross-Organizational Impact",value:"Break down departmental silos. Deliver tailored, high-impact findings directly to CX, Product, Operations, IT, and Sales to align your entire company under one strategy.",tickers:["// UNIFIED_STRATEGY","// 360_IMPACT"],Mockup:jte}],lb=["Call Center Calls","Customer Interviews","Support Tickets","Sales Calls","Chat Messages","CRM Emails"],Ote=()=>{const[t,e]=I.useState(0),[n,i]=I.useState(0);I.useEffect(()=>{const a=setInterval(()=>i(o=>(o+1)%lb.length),3e3);return()=>{clearInterval(a)}},[]);const r=a=>e(a),s=t>=0?cR[t].Mockup:null;return l.jsx("section",{className:"bg-white py-20 md:py-28 px-6 md:px-16 lg:px-24",style:{fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-gray-900 leading-tight",children:["Turn your"," ",l.jsx("span",{className:"inline-flex overflow-hidden align-bottom",style:{height:"1.2em"},children:l.jsx(Vl,{mode:"wait",children:l.jsx(me.span,{className:"font-bold",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.4,ease:"easeInOut"},children:lb[n]},lb[n])})}),l.jsx("br",{}),"into Actionable Insights"]}),l.jsx("div",{className:"mt-4 h-1 w-20 rounded-full",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"}}),l.jsx("p",{className:"mt-4 text-gray-500 text-base md:text-lg",children:"Turning Every Conversation into a High-Fidelity Growth Asset"}),l.jsxs("div",{className:"mt-12 grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[l.jsx("div",{className:"rounded-2xl overflow-hidden aspect-[4/3]",style:{background:"#150835"},children:l.jsx(Vl,{mode:"wait",children:s&&l.jsx(me.div,{className:"w-full h-full",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.35},children:l.jsx(s,{})},t)})}),l.jsx("div",{children:cR.map((a,o)=>{const c=t===o;return l.jsxs("div",{className:"border-t border-gray-200",children:[l.jsxs("button",{onClick:()=>r(o),className:"w-full flex items-center justify-between py-5 text-left",children:[l.jsx("span",{className:"text-xl md:text-2xl font-medium",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:a.title}),l.jsx(m3,{className:`w-5 h-5 text-gray-400 shrink-0 transition-transform duration-300 ${c?"rotate-180":""}`})]}),l.jsx(Vl,{initial:o===0,children:c&&l.jsx(me.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"overflow-hidden",children:l.jsxs("div",{className:"pb-5 pl-1 space-y-3",children:[l.jsx("p",{className:"text-sm md:text-base text-gray-500 leading-relaxed",children:a.value}),l.jsx("div",{className:"flex flex-wrap gap-2",children:a.tickers.map(u=>l.jsxs("span",{className:"flex items-center gap-0 border border-[#150835]/10 rounded-md overflow-hidden text-xs font-medium text-[#150835]/60",children:[l.jsx("span",{className:"self-stretch w-[3px] shrink-0",style:{background:"linear-gradient(180deg, #FF3478, #FF4D2A)"}}),l.jsx("span",{className:"px-2.5 py-1 bg-[#150835]/[0.04] font-mono tracking-tight",children:u})]},u))})]})})})]},o)})})]})]})})},Ute="/assets/ecovidrio--nOsXzwV.png",zte="/assets/cellnex-BzEnKsXQ.svg",Bte="/assets/delta-DQn9wl3N.png",Vte="/assets/totalenergies-CDamilr1.png",Hte="/assets/greenflex-r-zC7H-M.png",Wte="/assets/bankinter-D3JqIY4v.png",Gte="/assets/telefonica-BGqwLBC4.png",qte="/assets/Stadler-iLecF2W7.png",uR=[{src:Ute,alt:"Ecovidrio — glass recycling leader using Lexic AI conversational intelligence"},{src:zte,alt:"Cellnex Telecom — telecom infrastructure company using Lexic AI insights"},{src:Bte,alt:"Delta Cafés — food and beverage brand leveraging Lexic AI customer analytics",useBlendMode:!0},{src:Vte,alt:"TotalEnergies — global energy company using Lexic AI conversation analysis"},{src:Hte,alt:"GreenFlex by TotalEnergies — sustainability consultancy using Lexic AI"},{src:Wte,alt:"Bankinter — Spanish banking group using Lexic AI for customer experience"},{src:Gte,alt:"Telefónica — telecommunications leader using Lexic AI call center analytics"},{src:qte,alt:"Stadler — rail vehicle manufacturer using Lexic AI operational intelligence"}],Xte=()=>l.jsxs("section",{className:"py-20 px-4",style:{background:"#150835",fontFamily:"Quicksand, sans-serif"},children:[l.jsx("div",{className:"max-w-5xl mx-auto text-center mb-12",children:l.jsxs("h2",{className:"text-xl md:text-2xl font-light text-white/80 tracking-wide",children:["Executives of these companies are already"," ",l.jsx("span",{className:"italic font-medium",style:{backgroundImage:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"decoding"})," ","conversations"]})}),l.jsx("div",{className:"overflow-hidden",children:l.jsx("div",{className:"flex animate-scroll-left hover:[animation-play-state:paused] w-max",children:[...uR,...uR].map((t,e)=>l.jsx("div",{className:"flex-shrink-0 w-32 mx-8 flex items-center justify-center",children:l.jsx("img",{src:t.src,alt:t.alt,loading:"lazy",className:`h-10 w-full object-contain hover:opacity-100 transition-opacity duration-300 ${t.useBlendMode?"opacity-70":"brightness-0 invert opacity-70"}`,style:t.useBlendMode?{mixBlendMode:"screen"}:void 0})},`${t.alt}-${e}`))})})]}),RO=I.createContext(null),$te=({children:t})=>{const[e,n]=I.useState(!1),i=()=>{n(!0),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"book_meeting_click",eventCategory:"CTA",eventAction:"click",eventLabel:"Book a Meeting"})};return l.jsx(RO.Provider,{value:{isCalendarOpen:e,openCalendar:i,closeCalendar:()=>n(!1)},children:t})},pc=()=>{const t=I.useContext(RO);if(!t)throw new Error("useCalendarModal must be used inside CalendarModalProvider");return t},IO=({src:t,onClose:e})=>l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",onClick:e,children:l.jsxs("div",{className:"relative w-full max-w-4xl mx-4",onClick:n=>n.stopPropagation(),children:[l.jsx("button",{onClick:e,className:"absolute -top-10 right-0 text-white text-2xl font-light hover:text-gray-300 transition-colors","aria-label":"Close video",children:"✕"}),l.jsx("video",{src:t,controls:!0,autoPlay:!0,playsInline:!0,className:"w-full rounded-2xl shadow-2xl"})]})}),Yte=({text:t})=>{const e=`${t} • ${t} • ${t}`;return l.jsx("div",{className:"overflow-hidden rounded-lg bg-black/5 py-1.5 px-2 mt-4",children:l.jsx("p",{className:"whitespace-nowrap font-mono text-[9px] text-[#FF3478] animate-scroll-left",children:e})})},Qte=()=>{const[t,e]=I.useState(!1),n=[3,5,2,7,4,8,3,6,5,2,7,4,6,3,5,8,2,4,7,3,5,6,4,8,3];return l.jsxs("div",{className:"rounded-2xl bg-[#150835] p-5 shadow-lg h-full flex flex-col",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-gray-400 mb-4",children:"Conversation Analysis and Insights"}),l.jsxs("div",{className:"grid grid-cols-2 gap-4 flex-1",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500 mb-3",children:"Live Transcription"}),l.jsx("div",{className:"flex items-end gap-[3px] h-16 mb-4",children:n.map((i,r)=>l.jsx(me.div,{className:"w-[3px] rounded-full bg-gradient-to-t from-[#FF3478] to-[#FF4D2A]",animate:{height:[4,i*6,4]},transition:{duration:1.2+r%5*.2,repeat:1/0,repeatType:"reverse",delay:r*.05,ease:"easeInOut"}},r))}),l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[l.jsx("span",{className:"rounded-full bg-[#FF3478]/20 px-2 py-0.5 text-[9px] text-[#FF3478] font-medium",children:"shipping delay"}),l.jsx("span",{className:"rounded-full bg-[#FF3478]/20 px-2 py-0.5 text-[9px] text-[#FF3478] font-medium",children:"confused about pricing"})]})]}),l.jsxs("div",{className:"rounded-xl bg-white/5 p-3 space-y-3",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500",children:"Alerts"}),l.jsxs("div",{className:"space-y-2 text-[10px]",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 flex-shrink-0"}),l.jsx("span",{className:"text-gray-400",children:"Alert:"}),l.jsx("span",{className:"text-white font-medium",children:"Churn Signal"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-400 flex-shrink-0"}),l.jsx("span",{className:"text-gray-400",children:"Friction:"}),l.jsx("span",{className:"text-white font-medium",children:"Billing Clarity"})]}),l.jsxs("div",{className:"space-y-1 pt-1 border-t border-white/10",children:[l.jsx("p",{className:"text-gray-500 text-[9px]",children:"Auto-Actions"}),l.jsx("span",{className:"block rounded bg-emerald-500/20 px-1.5 py-0.5 text-[9px] text-emerald-400 font-medium",children:"✓ CRM Updated"}),l.jsx("span",{className:"block rounded bg-emerald-500/20 px-1.5 py-0.5 text-[9px] text-emerald-400 font-medium",children:"✓ Ticket Created"})]})]})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl bg-white/5 p-3 space-y-2",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500",children:"Generated Insights"}),l.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-[#A78BFA]/10 px-2.5 py-1.5",children:[l.jsx(x3,{size:12,className:"text-[#A78BFA] flex-shrink-0"}),l.jsx("span",{className:"text-[10px] text-[#A78BFA] font-medium",children:"Improvement Insights Report"})]}),l.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-amber-400/10 px-2.5 py-1.5",children:[l.jsx(v3,{size:12,className:"text-amber-400 flex-shrink-0"}),l.jsx("span",{className:"text-[10px] text-amber-400 font-medium",children:"Quick Wins to fix friction"})]})]}),l.jsxs("button",{onClick:()=>e(!0),className:"mt-4 w-full flex items-center justify-center gap-2 rounded-xl py-2.5 text-xs font-semibold uppercase tracking-widest text-white transition-opacity hover:opacity-90",style:{backgroundImage:"linear-gradient(90deg, #FF3478, #FF4D2A)"},children:[l.jsx(yy,{size:13}),"Watch a Video"]}),t&&l.jsx(IO,{src:"/videos/passive-listening.mp4",onClose:()=>e(!1)})]})},Kte=()=>{const[t,e]=I.useState(!1);return l.jsxs("div",{className:"rounded-2xl bg-[#150835] p-5 shadow-lg h-full flex flex-col",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-gray-400 mb-4",children:"Dynamic Dialogue Map"}),l.jsxs("div",{className:"grid grid-cols-2 gap-4 flex-1 min-h-0",children:[l.jsxs("div",{className:"space-y-2 flex flex-col justify-start",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500 mb-2",children:"Agent Dialogue"}),l.jsxs("div",{className:"rounded-lg bg-white/10 p-2.5 text-[10px] text-gray-300 leading-relaxed",children:[l.jsx("span",{className:"text-[#A78BFA] font-semibold text-[9px] block mb-1",children:"AI Agent"}),'"You mentioned the interface feels slow — is that specifically during data export or general navigation?"']}),l.jsxs("div",{className:"rounded-lg bg-[#FF3478]/10 p-2.5 text-[10px] text-gray-300 leading-relaxed ml-4",children:[l.jsx("span",{className:"text-[#FF3478] font-semibold text-[9px] block mb-1",children:"User"}),'"Mostly during export — it takes forever when the dataset is large."']}),l.jsxs("div",{className:"rounded-lg bg-white/10 p-2.5 text-[10px] text-gray-300 leading-relaxed",children:[l.jsx("span",{className:"text-[#A78BFA] font-semibold text-[9px] block mb-1",children:"AI Agent"}),'"Got it. Is that impacting your weekly reporting workflow?"']})]}),l.jsxs("div",{className:"flex flex-col items-center justify-center relative",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500 mb-3 self-start",children:"Insight Map"}),l.jsxs("div",{className:"relative flex flex-col items-center",children:[l.jsx("div",{className:"rounded-full bg-gradient-to-r from-[#FF3478] to-[#FF4D2A] px-3 py-1.5 text-[9px] font-semibold text-white shadow-lg",children:"Slow Export"}),l.jsxs("div",{className:"flex gap-6 mt-3",children:[l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("div",{className:"w-px h-4 bg-white/20"}),l.jsxs("div",{className:"rounded-md bg-[#A78BFA]/20 border border-[#A78BFA]/30 px-2 py-1 text-[8px] text-[#A78BFA] font-medium text-center",children:["Uncovered",l.jsx("br",{}),"Intent"]}),l.jsx("div",{className:"w-px h-3 bg-white/10"}),l.jsx("div",{className:"rounded bg-white/5 px-1.5 py-0.5 text-[7px] text-gray-400 text-center",children:"Large datasets"})]}),l.jsxs("div",{className:"flex flex-col items-center",children:[l.jsx("div",{className:"w-px h-4 bg-white/20"}),l.jsxs("div",{className:"rounded-md bg-emerald-500/20 border border-emerald-500/30 px-2 py-1 text-[8px] text-emerald-400 font-medium text-center",children:["Actionable",l.jsx("br",{}),"Feedback"]}),l.jsx("div",{className:"w-px h-3 bg-white/10"}),l.jsx("div",{className:"rounded bg-white/5 px-1.5 py-0.5 text-[7px] text-gray-400 text-center",children:"Weekly reports"})]})]})]})]})]}),l.jsxs("button",{onClick:()=>e(!0),className:"mt-4 w-full flex items-center justify-center gap-2 rounded-xl py-2.5 text-xs font-semibold uppercase tracking-widest text-white transition-opacity hover:opacity-90",style:{backgroundImage:"linear-gradient(90deg, #FF3478, #FF4D2A)"},children:[l.jsx(yy,{size:13}),"Watch a Video"]}),t&&l.jsx(IO,{src:"/videos/active-probing.mp4",onClose:()=>e(!1)})]})},Zte=[{num:"01",name:"Passive Listening",subtitle:"Decoding Existing Conversations",description:'Turn the fragmented "dark data" in your call centers and support tickets into high-fidelity intelligence.',bullets:[{label:"Multi-Modal Analysis",value:"Process 100% of your voice calls, chats, and tickets at scale."},{label:"Friction Identification",value:"Automatically pinpoint the root causes of customer frustration and churn."},{label:"Operational Visibility",value:"Transform hidden signals into structured strategic knowledge."}],ticker:"// 100% COVERAGE // SEMANTIC EXTRACTION // DARK DATA RECOVERY",Mockup:Qte,bg:"bg-slate-50"},{num:"02",name:"Active Listening",subtitle:"Generating Proactive Conversations",description:"Don't wait for data to come to you. Use generative agents to probe deeper into user intent and motivations.",bullets:[{label:"Generative Probing",value:"Conduct dynamic, human-like interviews via WhatsApp, Voice, or Web."},{label:"Intent Discovery",value:'Go beyond static surveys to uncover the real "Why" behind customer behavior.'},{label:"Scalable Focus Groups",value:"Get qualitative depth with the infinite scalability of AI-moderated interviews."}],ticker:"// AI INTERVIEWS // 360° FEEDBACK // AUTONOMOUS PROBING",Mockup:Kte,bg:"bg-violet-50/60"}],Jte=()=>{const{openCalendar:t}=pc();return l.jsx("section",{className:"bg-white py-20 md:py-28 px-6 md:px-16 lg:px-24",style:{fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs("div",{className:"mb-14",children:[l.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-gray-900 leading-tight",children:"Lexic Pulse: The Conversational Intelligence Stack"}),l.jsx("div",{className:"mt-4 h-1 w-20 rounded-full",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"}}),l.jsx("p",{className:"mt-6 text-gray-500 text-base md:text-lg font-light",children:"Closing the Strategic Loop Between Human Sentiment and Corporate Execution."})]}),l.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10",children:Zte.map(({num:e,name:n,subtitle:i,description:r,bullets:s,ticker:a,Mockup:o,bg:c})=>l.jsxs(me.div,{className:`rounded-3xl ${c} p-8 md:p-10 flex flex-col h-full min-h-0`,initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},transition:{duration:.5},viewport:{once:!0,margin:"-80px"},children:[l.jsxs("p",{className:"text-sm font-semibold uppercase tracking-widest mb-1",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:[e," | ",n]}),l.jsx("h3",{className:"text-xl md:text-2xl font-light text-gray-900 mb-2",children:i}),l.jsx("p",{className:"text-sm text-gray-500 leading-relaxed mb-5 max-w-md",children:r}),l.jsx("ul",{className:"space-y-2.5 mb-8",children:s.map(({label:u,value:f})=>l.jsxs("li",{className:"flex items-start gap-2.5 text-sm",children:[l.jsx("span",{className:"mt-1.5 h-2 w-2 rounded-full flex-shrink-0",style:{background:"linear-gradient(135deg, #FF3478, #FF4D2A)"}}),l.jsxs("span",{className:"text-gray-600",children:[l.jsxs("span",{className:"font-semibold text-gray-800",children:[u,":"]})," ",f]})]},u))}),l.jsx("div",{className:"flex-1",children:l.jsx(o,{})}),l.jsx(Yte,{text:a})]},e))}),l.jsx(me.div,{className:"flex justify-center mt-12",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:l.jsxs("button",{onClick:t,className:"group relative flex items-center gap-2 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white overflow-hidden transition-all duration-300",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},children:[l.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 transition-opacity duration-300 rounded-full"}),"Book a Demo",l.jsx(qr,{size:16,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})})},ene=[{icon:vB,title:"Autonomous Resolution",desc:"Deploy agents that talk, listen, and solve. Fix customer friction in real-time through voice and text.",tickers:["// FRONT_OFFICE","// VOICE_&_CHAT"]},{icon:bB,title:"Back-Office Automation",desc:"Eradicate manual data entry. Autonomously audit complex documents and sync data across your CRM.",tickers:["// CRM_SYNC","// DOC_AUDIT"]},{icon:sf,title:"Dynamic Orchestration",desc:"Trigger instant workflows. Dynamically adjust logistics routes or escalate tickets based on real-time dialogue.",tickers:["// ERP_INTEGRATION","// API_TRIGGERS"]},{icon:AB,title:"24/7 Agentic Scale",desc:"Multiply your execution capabilities. Scale your operational capacity infinitely without increasing human headcount.",tickers:["// INFINITE_SCALE","// ZERO_LATENCY"]}],tne=()=>{const{openCalendar:t}=pc();return l.jsx("section",{className:"py-20 md:py-28 px-6 md:px-16 lg:px-24",style:{background:"#0f0f1a",fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-8",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-[#FF3478] animate-pulse flex-shrink-0"}),l.jsx("span",{className:"font-mono text-[#FF3478] text-xs tracking-widest",children:"[ STATUS: EXECUTION_LAYER_ACTIVE ]"})]}),l.jsxs(me.div,{className:"mb-16 max-w-3xl",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5},children:[l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("span",{className:"h-px w-8",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"}}),l.jsx("span",{className:"text-white text-lg font-medium tracking-wide",children:"The Execution Layer"})]}),l.jsx("h2",{className:"text-3xl md:text-5xl font-bold text-white mb-6",children:"Closing the Loop: From Insight to Execution"}),l.jsx("p",{className:"text-white/40 text-lg leading-relaxed",children:"We don't stop at understanding. Lexic architects autonomous agents that operate across your entire stack to turn intelligence into deterministic action."})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row gap-12 items-center",children:[l.jsxs(me.div,{className:"w-full lg:w-5/12 h-[400px] rounded-2xl border border-white/10 bg-black/50 p-6 relative overflow-hidden flex flex-col justify-center",initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.6},children:[l.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(to_right,#80808012_1px,transparent_1px),linear-gradient(to_bottom,#80808012_1px,transparent_1px)] bg-[size:24px_24px]"}),l.jsxs("div",{className:"relative z-10 flex items-center justify-between w-full h-full",children:[l.jsxs("div",{className:"flex flex-col items-center gap-2",children:[l.jsx("div",{className:"px-3 py-1 bg-white/10 border border-white/20 rounded-md text-[10px] text-gray-300 font-mono animate-pulse",children:"[!] Friction Detected"}),l.jsx("div",{className:"w-16 h-16 rounded-full flex items-center justify-center animate-[spin_4s_linear_infinite]",style:{background:"linear-gradient(135deg, rgba(255,52,120,0.2), rgba(255,77,42,0.2))",border:"1px solid rgba(255,52,120,0.5)"},children:l.jsx("div",{className:"w-8 h-8 rounded-full",style:{background:"linear-gradient(135deg, #FF3478, #FF4D2A)"}})}),l.jsx("div",{className:"text-xs font-mono mt-2",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"LEXIC CORE"})]}),l.jsx("div",{className:"flex-1 h-px mx-4 relative",style:{background:"linear-gradient(to right, #FF3478, rgba(255,255,255,0.1))"},children:l.jsx("div",{className:"absolute top-1/2 left-0 w-2 h-2 rounded-full -translate-y-1/2 animate-ping",style:{background:"#FF3478"}})}),l.jsx("div",{className:"flex flex-col gap-6 w-32",children:["SALESFORCE","WHATSAPP","ZENDESK"].map(e=>l.jsxs("div",{className:"p-3 rounded-lg border border-white/10 bg-black flex flex-col items-center gap-2 transition-colors hover:border-[#FF3478]/50",children:[l.jsxs("span",{className:"text-[9px] text-gray-500 font-mono",children:["// ",e]}),l.jsx("div",{className:"w-full h-1.5 bg-green-500/80 rounded-full"})]},e))})]}),l.jsx("div",{className:"absolute bottom-4 left-6",children:l.jsx("span",{className:"text-[10px] font-mono text-gray-500",children:"Routing Actions Automatically..."})})]}),l.jsx("div",{className:"w-full lg:w-7/12 grid sm:grid-cols-2 gap-6",children:ene.map(({icon:e,title:n,desc:i,tickers:r},s)=>l.jsxs(me.div,{className:"p-6 rounded-xl border border-white/5 bg-white/[0.02] hover:bg-white/[0.04] transition-colors",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.5,delay:s*.1},children:[l.jsx("div",{className:"w-10 h-10 rounded-lg flex items-center justify-center mb-4",style:{background:"linear-gradient(135deg, rgba(255,52,120,0.1), rgba(255,77,42,0.1))"},children:l.jsx(e,{size:20,style:{color:"#FF3478"}})}),l.jsx("h3",{className:"text-white font-semibold mb-2",children:n}),l.jsx("p",{className:"text-sm text-white/40 mb-6 leading-relaxed",children:i}),l.jsx("div",{className:"flex gap-2",children:r.map(a=>l.jsx("span",{className:"text-[9px] font-mono text-gray-500 bg-black/50 px-2 py-1 rounded border border-white/5",children:a},a))})]},n))})]}),l.jsx(me.div,{className:"flex justify-center mt-12",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:l.jsxs("button",{onClick:t,className:"group relative flex items-center gap-2 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white overflow-hidden transition-all duration-300",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},children:[l.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 transition-opacity duration-300 rounded-full"}),"Book a Demo",l.jsx(qr,{size:16,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})})},nne=[{number:"01",icon:MB,title:"Fragmented Noise to Unified Intelligence",tickers:["Unify disconnected voice and text silos into a single intelligence layer.","Decode the nuances of your existing call streams, tickets, and logs at scale.",'Transform "dark data" into the primary strategic anchor for your organization.']},{number:"02",icon:kB,title:"Static Surveys to Deep Probing",tickers:["Combine survey scalability with the qualitative depth of a focus group.","Conduct generative, human-like interviews to discover true customer intent.","Ask Directly to get your most pressing business doubts answered by the people who matter most."]},{number:"03",icon:sf,title:"Analysis Paralysis to Automated Action",tickers:["No Dashboards—we deliver high-impact, automated results instead of more charts.","Heavy Lifting of filtering and synthesis is handled entirely by our architecture.","Direct Delivery of pure value to your Inbox, Teams, or through direct CRM sync."]}],ine=()=>{const[t,e]=I.useState(null),{openCalendar:n}=pc();return l.jsx("section",{className:"w-full py-24 px-6 md:px-16 lg:px-24",style:{background:"#ffffff",fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsx(me.h2,{className:"text-3xl md:text-4xl lg:text-5xl font-light text-gray-900 mb-4",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:"The Lexic Transformation"}),l.jsx(me.p,{className:"text-base md:text-lg text-gray-500 max-w-2xl mb-16 font-light",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.05},children:"Turning Every Interaction into a High-Fidelity Growth Asset"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-16",children:nne.map((i,r)=>{const s=i.icon;return l.jsxs(me.div,{className:"relative rounded-2xl p-8 flex flex-col justify-between min-h-[380px] border border-gray-200 cursor-pointer overflow-hidden",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.15*r},onMouseEnter:()=>e(r),onMouseLeave:()=>e(null),children:[l.jsx(me.div,{className:"absolute inset-0 rounded-2xl bg-white",animate:{opacity:t===r?0:1},transition:{duration:.5}}),l.jsxs("div",{className:"relative z-10",children:[l.jsx(s,{size:24,className:`transition-colors duration-500 ${t===r?"text-white/70":"text-gray-400"}`}),l.jsx("span",{className:`block text-sm font-medium tracking-widest mt-3 transition-colors duration-500 ${t===r?"text-white/70":"text-gray-400"}`,children:i.number}),l.jsx("h4",{className:`text-lg font-semibold mt-3 transition-colors duration-500 ${t===r?"text-white":"text-gray-900"}`,children:i.title})]}),l.jsx("ul",{className:"relative z-10 space-y-3 mt-auto",children:i.tickers.map((a,o)=>l.jsxs("li",{className:"flex items-start gap-2.5",children:[l.jsx("span",{className:`mt-1.5 w-2 h-2 rounded-full flex-shrink-0 transition-all duration-500 ${t===r?"bg-white/70":""}`,style:t!==r?{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"}:{}}),l.jsx("span",{className:`text-sm font-light leading-relaxed transition-colors duration-500 ${t===r?"text-white":"text-gray-600"}`,children:a})]},o))})]},i.number)})}),l.jsx(me.div,{className:"flex justify-center",initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.5},children:l.jsxs("button",{onClick:n,className:"group flex items-center gap-2 border border-gray-900 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-gray-900 hover:bg-[#240AFF] hover:border-[#240AFF] hover:text-white transition-colors duration-300",children:["Start Architecting",l.jsx(qr,{size:16,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})})},rne="2026-02-18",sne="1.0",ane=[{question:"How can a voice agent gather customer feedback effectively?",answer:"Voice agents gather customer feedback through natural AI-powered conversations via phone, WhatsApp, or web chat. They use advanced natural language processing to adapt questions based on customer responses, creating authentic dialogue that generates deeper insights than traditional surveys. The AI can detect emotions, identify satisfaction patterns, and automatically drill down into specific topics for comprehensive feedback collection."},{question:"What are voice-based feedback surveys and how do they improve customer insights?",answer:"Voice-based feedback surveys are automated conversations conducted by AI agents that replace static forms. Unlike traditional surveys, they enable dynamic follow-up questions, real-time response adaptation, and capture of emotional nuances. Customers feel more comfortable speaking than typing, resulting in more honest and detailed responses that provide actionable business insights."},{question:"How do voice agents improve B2B market research efficiency compared to traditional methods?",answer:"Voice agents automate complex market research processes while maintaining human-quality conversations. They can conduct hundreds of interviews simultaneously, adapt questions based on responses, and extract insights that traditional surveys miss. B2B companies see 50% faster research cycles, 60% cost reduction, and 3x more actionable insights compared to manual research methods."},{question:"How do AI voice agents improve response rates compared to traditional surveys?",answer:"AI voice agents achieve 3-5x higher response rates than email surveys because they create personal, conversational experiences. Voice interactions feel more human and less intrusive than forms. The technology adapts to customer preferences, speaks multiple languages natively, and can conduct interviews at optimal times, resulting in 60-80% response rates versus 10-20% for traditional surveys."},{question:"What industries benefit most from customer research feedback voice agents?",answer:"B2B SaaS companies see exceptional results for feature validation and customer onboarding optimization. eCommerce benefits from cart abandonment analysis and post-purchase feedback. Hospitality uses voice agents for guest satisfaction monitoring. Market research firms accelerate primary research projects. Financial services improve NPS scores, while retail enhances in-store experiences through voice feedback collection."},{question:"Is it legal to make these feedback calls? Do we need additional consent from our customers?",answer:"Yes, it is completely legal, and no, additional consent is not required. The legal basis supporting these calls is not consent, but rather your company's legitimate interest, one of the legal grounds for data processing permitted by the General Data Protection Regulation (GDPR). Legitimate interest applies because your company has a genuine and justified interest in improving its services, which benefits both the company and the customer. This interest is based on: Improving your products and services based on direct feedback from those who use them. Increasing customer satisfaction and loyalty by showing that their opinion matters. Proactively managing the post-sale relationship. Since we are calling customers who already have a contractual relationship with you, there is a reasonable expectation of contact, and the impact on their privacy is minimal. Therefore, it is not necessary to request additional permission."},{question:"How much does AI customer interview automation software cost for businesses?",answer:"LexicPulse offers flexible subscription plans starting from small business tiers to enterprise-scale solutions. Pricing is based on monthly interview volume, channels used, and advanced features needed. All plans include unlimited analysis, automated reporting, and CRM integrations. Contact us for a customized quote based on your industry and specific requirements."},{question:"What ROI can SaaS companies expect from automated customer feedback collection?",answer:"SaaS companies typically see 250-400% ROI within 6 months. Key benefits include: 30% reduction in churn rates, 45% improvement in trial-to-paid conversion, 50% faster feature adoption, and 60% reduction in manual research time. AI interviews identify specific onboarding friction points and feature gaps that directly impact revenue growth."},{question:"Does the AI voice interview platform work across different time zones for global businesses?",answer:"Yes. LexicPulse operates 24/7 across all global time zones with native support for 25+ languages. The AI automatically schedules interviews based on customer preferences and local business hours. Perfect for international market research, cross-cultural customer insights, and global customer satisfaction tracking without hiring multilingual researchers."},{question:"How does automated customer research reduce shopping cart abandonment for eCommerce?",answer:"AI interviews identify specific checkout friction points: payment concerns, shipping costs, trust issues, and process complexity. Real-time sentiment analysis flags abandonment triggers, enabling immediate optimization. eCommerce clients typically see 25-40% reduction in cart abandonment and 20% increase in conversion rates within 60 days of implementation."},{question:"What's the difference between LexicPulse and traditional survey tools like SurveyMonkey?",answer:"Key differences: Adaptive conversations vs rigid surveys, real-time sentiment analysis, automatic pain point detection, multi-channel support (voice, WhatsApp, web chat), and actionable insights vs raw data. Our AI conducts human-like interviews that dig deeper into responses, generating 3x more actionable insights than traditional static surveys."},{question:"How does the AI detect negative customer feedback and critical business issues?",answer:"Advanced NLP algorithms automatically identify: recurring complaints, product issues, process friction, churn risks, and upselling opportunities. Real-time alert system notifies your customer success team of critical issues requiring immediate attention. Sentiment scoring and theme extraction highlight patterns across thousands of conversations."},{question:"Is the AI customer interview platform GDPR compliant and secure for European businesses?",answer:"100% GDPR, CCPA, and international data protection compliant. European data centers ensure data sovereignty. End-to-end encryption, automatic PII anonymization, and granular consent controls. Regular security audits and SOC 2 Type II certification for enterprise compliance requirements."},{question:"Which industries get the best results from AI-powered customer interview automation?",answer:"Exceptional results across: SaaS (onboarding optimization), eCommerce (cart abandonment reduction), Hospitality (guest satisfaction), Healthcare (patient experience), Financial Services (NPS improvement), Retail (in-store experience). Each industry receives specialized templates and custom metrics for maximum impact."},{question:"How quickly can businesses implement AI customer interviews and see results?",answer:"Implementation: 24-48 hours with our dedicated onboarding team. First insights: Within 7 days of launch. Measurable ROI: 30 days. Includes data migration, CRM integration setup, team training, and ongoing optimization based on initial results. No technical expertise required from your team."},{question:"Can the AI interview platform integrate with existing CRM systems like Salesforce and HubSpot?",answer:"Native integrations with Salesforce, HubSpot, Pipedrive, Zoho, and 50+ popular CRMs. Automatic two-way sync of contacts, interaction history, and satisfaction scores. Smart segmentation based on CRM data for targeted interview campaigns and automated lead scoring based on feedback sentiment."}],one={exportDate:rne,version:sne,faqs:ane};var lv="Collapsible",[lne,kO]=ud(lv),[cne,vM]=lne(lv),LO=I.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:i,defaultOpen:r,disabled:s,onOpenChange:a,...o}=t,[c,u]=$f({prop:i,defaultProp:r??!1,onChange:a,caller:lv});return l.jsx(cne,{scope:n,disabled:s,contentId:RS(),open:c,onOpenToggle:I.useCallback(()=>u(f=>!f),[u]),children:l.jsx(Kn.div,{"data-state":bM(c),"data-disabled":s?"":void 0,...o,ref:e})})});LO.displayName=lv;var DO="CollapsibleTrigger",FO=I.forwardRef((t,e)=>{const{__scopeCollapsible:n,...i}=t,r=vM(DO,n);return l.jsx(Kn.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":bM(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...i,ref:e,onClick:Fn(t.onClick,r.onOpenToggle)})});FO.displayName=DO;var wM="CollapsibleContent",jO=I.forwardRef((t,e)=>{const{forceMount:n,...i}=t,r=vM(wM,t.__scopeCollapsible);return l.jsx(fy,{present:n||r.open,children:({present:s})=>l.jsx(une,{...i,ref:e,present:s})})});jO.displayName=wM;var une=I.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:i,children:r,...s}=t,a=vM(wM,n),[o,c]=I.useState(i),u=I.useRef(null),f=Ar(e,u),p=I.useRef(0),m=p.current,g=I.useRef(0),y=g.current,b=a.open||o,w=I.useRef(b),x=I.useRef(void 0);return I.useEffect(()=>{const _=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(_)},[]),Xs(()=>{const _=u.current;if(_){x.current=x.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const S=_.getBoundingClientRect();p.current=S.height,g.current=S.width,w.current||(_.style.transitionDuration=x.current.transitionDuration,_.style.animationName=x.current.animationName),c(i)}},[a.open,i]),l.jsx(Kn.div,{"data-state":bM(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!b,...s,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:b&&r})});function bM(t){return t?"open":"closed"}var dne=LO,hne=FO,fne=jO,pne=I.createContext(void 0);function mne(t){const e=I.useContext(pne);return t||e||"ltr"}var bs="Accordion",gne=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[_M,xne,yne]=Ok(bs),[cv,qre]=ud(bs,[yne,kO]),SM=kO(),OO=Ae.forwardRef((t,e)=>{const{type:n,...i}=t,r=i,s=i;return l.jsx(_M.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?l.jsx(_ne,{...s,ref:e}):l.jsx(bne,{...r,ref:e})})});OO.displayName=bs;var[UO,vne]=cv(bs),[zO,wne]=cv(bs,{collapsible:!1}),bne=Ae.forwardRef((t,e)=>{const{value:n,defaultValue:i,onValueChange:r=()=>{},collapsible:s=!1,...a}=t,[o,c]=$f({prop:n,defaultProp:i??"",onChange:r,caller:bs});return l.jsx(UO,{scope:t.__scopeAccordion,value:Ae.useMemo(()=>o?[o]:[],[o]),onItemOpen:c,onItemClose:Ae.useCallback(()=>s&&c(""),[s,c]),children:l.jsx(zO,{scope:t.__scopeAccordion,collapsible:s,children:l.jsx(BO,{...a,ref:e})})})}),_ne=Ae.forwardRef((t,e)=>{const{value:n,defaultValue:i,onValueChange:r=()=>{},...s}=t,[a,o]=$f({prop:n,defaultProp:i??[],onChange:r,caller:bs}),c=Ae.useCallback(f=>o((p=[])=>[...p,f]),[o]),u=Ae.useCallback(f=>o((p=[])=>p.filter(m=>m!==f)),[o]);return l.jsx(UO,{scope:t.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:l.jsx(zO,{scope:t.__scopeAccordion,collapsible:!0,children:l.jsx(BO,{...s,ref:e})})})}),[Sne,uv]=cv(bs),BO=Ae.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:i,dir:r,orientation:s="vertical",...a}=t,o=Ae.useRef(null),c=Ar(o,e),u=xne(n),p=mne(r)==="ltr",m=Fn(t.onKeyDown,g=>{var D;if(!gne.includes(g.key))return;const y=g.target,b=u().filter(R=>{var k;return!((k=R.ref.current)!=null&&k.disabled)}),w=b.findIndex(R=>R.ref.current===y),x=b.length;if(w===-1)return;g.preventDefault();let _=w;const S=0,M=x-1,E=()=>{_=w+1,_>M&&(_=S)},C=()=>{_=w-1,_<S&&(_=M)};switch(g.key){case"Home":_=S;break;case"End":_=M;break;case"ArrowRight":s==="horizontal"&&(p?E():C());break;case"ArrowDown":s==="vertical"&&E();break;case"ArrowLeft":s==="horizontal"&&(p?C():E());break;case"ArrowUp":s==="vertical"&&C();break}const N=_%x;(D=b[N].ref.current)==null||D.focus()});return l.jsx(Sne,{scope:n,disabled:i,direction:r,orientation:s,children:l.jsx(_M.Slot,{scope:n,children:l.jsx(Kn.div,{...a,"data-orientation":s,ref:c,onKeyDown:i?void 0:m})})})}),Yx="AccordionItem",[Ane,AM]=cv(Yx),VO=Ae.forwardRef((t,e)=>{const{__scopeAccordion:n,value:i,...r}=t,s=uv(Yx,n),a=vne(Yx,n),o=SM(n),c=RS(),u=i&&a.value.includes(i)||!1,f=s.disabled||t.disabled;return l.jsx(Ane,{scope:n,open:u,disabled:f,triggerId:c,children:l.jsx(dne,{"data-orientation":s.orientation,"data-state":$O(u),...o,...r,ref:e,disabled:f,open:u,onOpenChange:p=>{p?a.onItemOpen(i):a.onItemClose(i)}})})});VO.displayName=Yx;var HO="AccordionHeader",WO=Ae.forwardRef((t,e)=>{const{__scopeAccordion:n,...i}=t,r=uv(bs,n),s=AM(HO,n);return l.jsx(Kn.h3,{"data-orientation":r.orientation,"data-state":$O(s.open),"data-disabled":s.disabled?"":void 0,...i,ref:e})});WO.displayName=HO;var C_="AccordionTrigger",GO=Ae.forwardRef((t,e)=>{const{__scopeAccordion:n,...i}=t,r=uv(bs,n),s=AM(C_,n),a=wne(C_,n),o=SM(n);return l.jsx(_M.ItemSlot,{scope:n,children:l.jsx(hne,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":r.orientation,id:s.triggerId,...o,...i,ref:e})})});GO.displayName=C_;var qO="AccordionContent",XO=Ae.forwardRef((t,e)=>{const{__scopeAccordion:n,...i}=t,r=uv(bs,n),s=AM(qO,n),a=SM(n);return l.jsx(fne,{role:"region","aria-labelledby":s.triggerId,"data-orientation":r.orientation,...a,...i,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});XO.displayName=qO;function $O(t){return t?"open":"closed"}var Mne=OO,Tne=VO,Ene=WO,YO=GO,QO=XO;const Cne=Mne,KO=I.forwardRef(({className:t,...e},n)=>l.jsx(Tne,{ref:n,className:oi("border-b",t),...e}));KO.displayName="AccordionItem";const ZO=I.forwardRef(({className:t,children:e,...n},i)=>l.jsx(Ene,{className:"flex",children:l.jsxs(YO,{ref:i,className:oi("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,l.jsx(m3,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ZO.displayName=YO.displayName;const JO=I.forwardRef(({className:t,children:e,...n},i)=>l.jsx(QO,{ref:i,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:l.jsx("div",{className:oi("pb-4 pt-0",t),children:e})}));JO.displayName=QO.displayName;const Pne=[{label:"About",path:"/about"},{label:"Solutions",path:"/solutions"},{label:"Platform",path:"/platform"},{label:"Partners",path:"/partners"},{label:"The Signal",path:"/signal"}],dn=()=>{const t=Kf(),[e,n]=I.useState(!1),[i,r]=I.useState(!1),s=a=>{t(a)};return l.jsx("footer",{className:"w-full px-6 md:px-16 lg:px-24 pt-16 pb-10",style:{background:"#150835",fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6 mb-12",children:[l.jsx("img",{src:KD,alt:"Lexic.AI",className:"h-8 md:h-10 w-auto cursor-pointer",onClick:()=>t("/"),style:{filter:"brightness(0) invert(1)"}}),l.jsxs("nav",{className:"flex flex-wrap gap-6",children:[Pne.map(a=>l.jsx("button",{onClick:()=>s(a.path),className:"text-white/60 hover:text-white text-xs md:text-sm font-medium uppercase tracking-[0.15em] transition-colors duration-200",children:a.label},a.label)),l.jsxs("button",{onClick:()=>n(a=>!a),className:`text-xs md:text-sm font-medium uppercase tracking-[0.15em] transition-colors duration-200 ${e?"text-[#FF3478]":"text-white/60 hover:text-white"}`,children:["FAQs",e?" ✓":""]}),l.jsxs("button",{onClick:()=>r(a=>!a),className:`text-xs md:text-sm font-medium uppercase tracking-[0.15em] transition-colors duration-200 ${i?"text-[#FF3478]":"text-white/60 hover:text-white"}`,children:["Contact",i?" ✓":""]})]})]}),l.jsx(Vl,{initial:!1,children:e&&l.jsx(me.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.35,ease:"easeInOut"},className:"overflow-hidden",children:l.jsxs("div",{className:"max-w-3xl mb-12",children:[l.jsxs("div",{className:"mb-8",children:[l.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.35em] text-[#FF3478] mb-4",children:"FAQ"}),l.jsx("h2",{className:"text-2xl md:text-3xl font-light text-white leading-tight",children:"Frequently Asked Questions"})]}),l.jsx(Cne,{type:"single",collapsible:!0,defaultValue:"faq-0",className:"divide-y divide-white/10",children:one.faqs.map((a,o)=>l.jsxs(KO,{value:`faq-${o}`,className:"border-0 py-1",children:[l.jsx(ZO,{className:"text-left text-sm md:text-base font-medium text-white hover:text-[#FF3478] hover:no-underline py-5 [&[data-state=open]>svg]:text-[#FF3478] [&>svg]:text-white/40 [&>svg]:transition-colors transition-colors duration-200",children:a.question}),l.jsx(JO,{className:"text-white/65 text-sm md:text-base font-light leading-relaxed pb-6 pt-1",children:a.answer})]},o))})]})},"faq-panel")}),l.jsx(Vl,{initial:!1,children:i&&l.jsx(me.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.35,ease:"easeInOut"},className:"overflow-hidden",children:l.jsxs("div",{className:"mb-12",children:[l.jsxs("div",{className:"mb-8",children:[l.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.35em] text-[#FF3478] mb-4",children:"Contact"}),l.jsx("h2",{className:"text-2xl md:text-3xl font-light text-white leading-tight",children:"Get in Touch"})]}),l.jsxs("div",{className:"flex flex-col gap-8 max-w-md pt-2",children:[l.jsx("p",{className:"text-white/60 text-sm font-light leading-relaxed",children:"Reach out and our team will get back to you as soon as possible."}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(gy,{size:16,className:"text-[#FF3478] mt-0.5 shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-white/40 text-xs uppercase tracking-[0.2em] mb-1",children:"Email"}),l.jsx("a",{href:"mailto:info@lexic.ai",className:"text-white hover:text-[#FF3478] transition-colors duration-200 text-sm font-medium",children:"info@lexic.ai"})]})]}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(PB,{size:16,className:"text-[#FF3478] mt-0.5 shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-white/40 text-xs uppercase tracking-[0.2em] mb-1",children:"Office"}),l.jsxs("address",{className:"not-italic text-white/70 text-sm font-light leading-relaxed",children:["Paseo Castellana, 200",l.jsx("br",{}),"SPACES",l.jsx("br",{}),"Madrid 28046 ES"]})]})]})]}),l.jsxs("div",{className:"flex items-start gap-3",children:[l.jsx(EB,{size:16,className:"text-[#FF3478] mt-0.5 shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-white/40 text-xs uppercase tracking-[0.2em] mb-1",children:"LinkedIn"}),l.jsx("a",{href:"https://www.linkedin.com/company/lexic-ai/",target:"_blank",rel:"noopener noreferrer",className:"text-white hover:text-[#FF3478] transition-colors duration-200 text-sm font-medium",children:"Lexic.AI on LinkedIn"})]})]})]})},"contact-panel")}),l.jsx("p",{className:"text-white text-2xl md:text-3xl font-light mb-10",children:"Conversational AI Architects"}),l.jsx("div",{className:"h-px w-full mb-10",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A, #240AFF)"}}),l.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-6 text-white/50 text-xs md:text-sm font-light",children:[l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{children:"© 2026 Lexic.AI. All Rights Reserved."}),l.jsx("p",{children:"Lexic.AI is a registered trademark of Lexic AI Ltd."})]}),l.jsxs("div",{className:"flex gap-6",children:[l.jsx(We,{to:"/privacy",className:"hover:text-white transition-colors",children:"Privacy Policy"}),l.jsx(We,{to:"/terms",className:"hover:text-white transition-colors",children:"Terms of Service"})]})]})]})})},Nne=()=>l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Lexic.AI - Turn Conversations into Actionable Insights",description:"Transform Call Center Calls, Chat Messages and Conversations into Actionable Insights with AI. Human-Centered Conversational AI Architects."}),l.jsx(un,{}),l.jsxs("main",{children:[l.jsx(Ite,{}),l.jsx("div",{id:"about",children:l.jsx(Ote,{})}),l.jsx(Xte,{}),l.jsx(Jte,{}),l.jsx(tne,{}),l.jsx(ine,{})]}),l.jsx(dn,{})]}),e4="/assets/sergio-llorens-new-BW9CyI-a.png",Rne="/assets/borja-marinas-yQ5vh1R7.png",Ine="/assets/juana-peraita-qVZXaAEf.png",kne="/assets/cristina-barros-k30ZQ4y5.png",Lne="/assets/luis-tramon-Z9zhX4ew.png",Dne="/assets/jorge-galvan-BkcOjMjD.png",Fne="/assets/jaime-velasco-Cbm0kbp5.jpeg",jne="/assets/jose-antonio-ramos-BFUpERWS.jfif",One="/assets/laura-morillo-C-AIrAdr.jpg",Une="/assets/jose-luis-mullor-fz2MNLD4.jpeg",zne="/assets/nehomar-correa-Coy0s44i.png",Bne="/assets/belen-frau-6VzeVCe1.jpg",Vne="/assets/mikel-izaguirre-Bk5k3MxW.jpg",Hne={Leadership:[{name:"Sergio Llorens Rubio",role:"Founder and CEO",photo:e4,linkedin:"https://www.linkedin.com/in/sllorenss/"},{name:"Nehomar Correa Requena",role:"CTO and Co-Founder",photo:zne,linkedin:"https://www.linkedin.com/in/nehomarc/"},{name:"Borja Marinas Monsalve",role:"Business Development Partner",photo:Rne,linkedin:"https://www.linkedin.com/in/borja-marinas-9055b8/"},{name:"Mikel Izaguirre",role:"Nordics Business Development Director",photo:Vne,linkedin:"https://www.linkedin.com/in/mikel-izaguirre-vizcaya-7356ba161/"}],"AI Engineering":[{name:"Cristina Barros",role:"PHD and Head of AI Engineering",photo:kne,linkedin:"https://www.linkedin.com/in/cristina-barros-catalan-phd-20b441a2/"},{name:"Jorge Galván",role:"Head of AI Product and Data Science",photo:Dne,linkedin:"https://www.linkedin.com/in/jorge-galvan-berdonces/"},{name:"Luis Tramón",role:"Head of AI Delivery",photo:Lne,linkedin:"https://www.linkedin.com/in/luistramon/"},{name:"Juana Peraita",role:"AI and Automation Specialist and Backend Developer",photo:Ine,linkedin:"https://www.linkedin.com/in/juana-peraita-172485220/"}],"Strategic Advisory":[{name:"Jaime Velasco",role:"Entrepreneur and GoSupply Founder",photo:Fne,linkedin:"https://www.linkedin.com/in/jvelpra/"},{name:"José Antonio Soler",role:"Banco Santander Global Treasurer",photo:jne,linkedin:"https://www.linkedin.com/in/jose-antonio-soler-ramos/"},{name:"Belen Frau",role:"IKEA CCO",photo:Bne,linkedin:"https://www.linkedin.com/in/belen-frau/"},{name:"Laura Morillo",role:"Impact VC Investor and Olive Tree Ventures Managing Partner",photo:One,linkedin:"https://www.linkedin.com/in/laura-morillo-gutierrez-10229b/"},{name:"Miguel Colomer",role:"Founder and CEO at Colway Industrial",linkedin:"https://www.linkedin.com/in/micolomer/"},{name:"Jose Luis Mullor",role:"PhD, CEO and CSO, Founder of Bionos Biotech",photo:Une,linkedin:"https://www.linkedin.com/in/jose-l-mullor-b777b212/"}]},Wne=["Leadership","AI Engineering","Strategic Advisory"],Gne=()=>{const[t,e]=I.useState("Leadership");return l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx(mn,{title:"About Lexic.AI - Conversational AI Architects",description:"Meet the team decoding human conversations for enterprise execution. AI-powered conversation intelligence."}),l.jsx(un,{}),l.jsxs("section",{className:"relative min-h-screen flex flex-col justify-end bg-[#F5F5F5] px-6 md:px-16 lg:px-24 pb-16 md:pb-24 pt-24",children:[l.jsxs(me.button,{onClick:()=>{var n;return(n=document.getElementById("team"))==null?void 0:n.scrollIntoView({behavior:"smooth"})},className:"absolute bottom-10 left-6 md:left-16 lg:left-24 z-10 flex items-center gap-1.5 text-[#FF3478] text-xs md:text-sm uppercase tracking-[0.35em] font-medium group",initial:{opacity:0},animate:{opacity:1},transition:{duration:.7,delay:.5},children:[l.jsx(yB,{size:14,className:"transition-transform duration-200 group-hover:translate-y-0.5"}),"Meet the Team"]}),l.jsx("div",{className:"max-w-6xl mx-auto w-full",children:l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-16 items-end",children:[l.jsxs(me.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-6",children:"About Lexic.AI"}),l.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-light text-[#150835] leading-[1.1]",children:"Decoding Human Data to Architect Autonomous Intelligence"})]}),l.jsx(me.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.7,delay:.2,ease:"easeOut"},className:"md:pb-2",children:l.jsx("p",{className:"text-[#150835]/60 text-base md:text-lg font-light leading-relaxed",children:"We are a specialized collective of AI architects and engineers building the mission-critical infrastructure that transforms fragmented human interaction into deterministic enterprise execution."})})]})})]}),l.jsx("section",{className:"bg-white px-6 md:px-16 lg:px-24 py-24 md:py-32",children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsx(me.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},children:l.jsx("h2",{className:"text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-10",children:"The Lexic Mission: Closing the Semantic Gap"})}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 md:gap-20",children:[l.jsx(me.p,{className:"text-2xl md:text-3xl font-light text-[#150835] leading-relaxed",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.1},children:"At Lexic, we believe human conversations is the most valuable yet least-understood asset in the modern enterprise."}),l.jsxs(me.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.2},children:[l.jsx("h3",{className:"text-sm font-medium uppercase tracking-[0.2em] text-[#150835] mb-4",children:"The Vision"}),l.jsx("p",{className:"text-[#150835]/60 text-base md:text-lg font-light leading-relaxed",children:'Our purpose is to bridge the "lexicon" of human expression with the precision of corporate logic. We architect a 360° value loop where organizational growth is fueled by a deeper, structural understanding of people, creating a continuous cycle of intelligence between companies and those they serve.'})]})]})]})}),l.jsx("section",{className:"bg-white px-6 md:px-16 lg:px-24 py-24 md:py-32",children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsx(me.p,{className:"text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-8",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:"Our Purpose"}),l.jsx(me.h2,{className:"text-3xl md:text-5xl font-light text-[#150835] leading-[1.15] mb-10 max-w-3xl",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.1},children:"Bridging the Reality Gap Between Enterprises and Humans"}),l.jsx(me.blockquote,{className:"border-l-4 border-[#FF3478] pl-6 mb-10 max-w-2xl",initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.7,delay:.2},children:l.jsx("p",{className:"text-xl md:text-2xl font-light italic text-[#150835] leading-relaxed",children:'"At Lexic, decoding conversations is our way of forcing the enterprise to confront the raw reality of their customers."'})}),l.jsx(me.p,{className:"text-[#150835]/60 text-base md:text-lg font-light leading-relaxed max-w-3xl mb-16",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.3},children:'Most organizations operate in a vacuum of understanding. While companies see data points, humans experience unintelligible terms and conditions, systemic service friction, and a profound emotional disconnect. We built Lexic to shatter that vacuum. We decode the truth behind every interaction to eliminate the "service chasm" and rebuild the bridge between corporate logic and human reality.'}),l.jsx("hr",{className:"border-[#150835]/10 mb-16"}),l.jsxs(me.div,{className:"mb-12",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},children:[l.jsx("h3",{className:"text-xl md:text-2xl font-medium text-[#150835] mb-4",children:"The R&D Horizon: Auditing the Autonomous Future"}),l.jsx("p",{className:"text-[#150835]/60 text-base md:text-lg font-light leading-relaxed max-w-3xl",children:"Our mission extends beyond today's human dialogues. The Lexic R&D Roadmap is focused on architecting the protocols for trust and clarity in an agent-led world. We don't just monitor; we audit the integrity of communication across the entire semantic spectrum:"})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[{label:"H2H",title:"Human-to-Human",description:"Eliminating friction and restoring empathy in traditional dialogue.",delay:0},{label:"H2AI",title:"Human-to-AI",description:"Auditing the relationship between people and intelligent agents to ensure ethical, effective, and human-aligned communication.",delay:.1},{label:"AI2AI",title:"Agent-to-Agent",description:"Engineering the auditing layers for autonomous machine-to-machine interactions, ensuring that corporate logic never loses sight of human value.",delay:.2}].map(n=>l.jsxs(me.div,{className:"bg-[#F5F5F5] rounded-2xl p-8 border-t-2 border-[#FF3478]",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:n.delay},children:[l.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.2em] text-[#FF3478] mb-3 block",children:n.label}),l.jsx("h4",{className:"text-lg font-medium text-[#150835] mb-3",children:n.title}),l.jsx("p",{className:"text-[#150835]/60 text-sm font-light leading-relaxed",children:n.description})]},n.label))})]})}),l.jsx("section",{id:"team",className:"bg-white px-6 md:px-16 lg:px-24 py-24 md:py-32",children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsx(me.h2,{className:"text-3xl md:text-4xl font-light text-[#150835] mb-10",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:"The Lexic Team"}),l.jsx("div",{className:"flex gap-2 mb-12 flex-wrap",children:Wne.map(n=>l.jsx("button",{onClick:()=>e(n),className:`px-5 py-2.5 rounded-full text-xs font-medium uppercase tracking-[0.15em] transition-all duration-300 ${t===n?"bg-[#150835] text-white":"bg-[#F5F5F5] text-[#150835]/60 hover:text-[#150835] hover:bg-[#EBEBEB]"}`,children:n},n))}),l.jsx(me.div,{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8",initial:{opacity:0,y:15},animate:{opacity:1,y:0},transition:{duration:.4},children:Hne[t].map(n=>l.jsxs("div",{className:"group",children:[l.jsxs("div",{className:"relative bg-[#E8E8E8] rounded-2xl aspect-square max-w-[240px] mb-4 overflow-hidden group/card",children:[n.photo&&l.jsx("img",{src:n.photo,alt:n.name,loading:"lazy",className:"w-full h-full object-cover object-top"}),n.linkedin&&l.jsx("a",{href:n.linkedin,target:"_blank",rel:"noopener noreferrer",referrerPolicy:"no-referrer",className:"absolute inset-0 bg-[#150835]/60 flex items-center justify-center opacity-0 group-hover/card:opacity-100 transition-opacity duration-300",children:l.jsx("svg",{className:"w-8 h-8 text-white",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:l.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})})]}),l.jsx("h3",{className:"text-lg font-medium text-[#150835]",children:n.name}),l.jsx("p",{className:"text-sm text-[#150835]/50 font-light",children:n.role})]},n.name))},t)]})}),l.jsx(dn,{})]})},qne=({src:t,onClose:e})=>l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",onClick:e,children:l.jsxs("div",{className:"relative w-full max-w-4xl mx-4",onClick:n=>n.stopPropagation(),children:[l.jsx("button",{onClick:e,className:"absolute -top-10 right-0 text-white text-2xl font-light hover:text-gray-300 transition-colors","aria-label":"Close video",children:"✕"}),l.jsx("video",{src:t,controls:!0,autoPlay:!0,playsInline:!0,className:"w-full rounded-2xl shadow-2xl"})]})}),Xne=()=>{const[t,e]=I.useState(!1),n=[3,5,2,7,4,8,3,6,5,2,7,4,6,3,5,8,2,4,7,3,5,6,4,8,3];return l.jsxs("div",{className:"rounded-2xl bg-[#150835] p-5 shadow-lg h-full flex flex-col",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-gray-400 mb-4",children:"Conversation Analysis and Insights"}),l.jsxs("div",{className:"grid grid-cols-2 gap-4 flex-1",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500 mb-3",children:"Live Transcription"}),l.jsx("div",{className:"flex items-end gap-[3px] h-16 mb-4",children:n.map((i,r)=>l.jsx(me.div,{className:"w-[3px] rounded-full bg-gradient-to-t from-[#FF3478] to-[#FF4D2A]",animate:{height:[4,i*6,4]},transition:{duration:1.2+r%5*.2,repeat:1/0,repeatType:"reverse",delay:r*.05,ease:"easeInOut"}},r))}),l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[l.jsx("span",{className:"rounded-full bg-[#FF3478]/20 px-2 py-0.5 text-[9px] text-[#FF3478] font-medium",children:"shipping delay"}),l.jsx("span",{className:"rounded-full bg-[#FF3478]/20 px-2 py-0.5 text-[9px] text-[#FF3478] font-medium",children:"confused about pricing"})]})]}),l.jsxs("div",{className:"rounded-xl bg-white/5 p-3 space-y-3",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500",children:"Alerts"}),l.jsxs("div",{className:"space-y-2 text-[10px]",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-red-500 flex-shrink-0"}),l.jsx("span",{className:"text-gray-400",children:"Alert:"}),l.jsx("span",{className:"text-white font-medium",children:"Churn Signal"})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"h-2 w-2 rounded-full bg-amber-400 flex-shrink-0"}),l.jsx("span",{className:"text-gray-400",children:"Friction:"}),l.jsx("span",{className:"text-white font-medium",children:"Billing Clarity"})]}),l.jsxs("div",{className:"space-y-1 pt-1 border-t border-white/10",children:[l.jsx("p",{className:"text-gray-500 text-[9px]",children:"Auto-Actions"}),l.jsx("span",{className:"block rounded bg-emerald-500/20 px-1.5 py-0.5 text-[9px] text-emerald-400 font-medium",children:"✓ CRM Updated"}),l.jsx("span",{className:"block rounded bg-emerald-500/20 px-1.5 py-0.5 text-[9px] text-emerald-400 font-medium",children:"✓ Ticket Created"})]})]})]})]}),l.jsxs("div",{className:"mt-4 rounded-xl bg-white/5 p-3 space-y-2",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500",children:"Generated Insights"}),l.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-[#A78BFA]/10 px-2.5 py-1.5",children:[l.jsx(x3,{size:12,className:"text-[#A78BFA] flex-shrink-0"}),l.jsx("span",{className:"text-[10px] text-[#A78BFA] font-medium",children:"Improvement Insights Report"})]}),l.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-amber-400/10 px-2.5 py-1.5",children:[l.jsx(v3,{size:12,className:"text-amber-400 flex-shrink-0"}),l.jsx("span",{className:"text-[10px] text-amber-400 font-medium",children:"Quick Wins to fix friction"})]})]}),l.jsxs("button",{onClick:()=>e(!0),className:"mt-4 w-full flex items-center justify-center gap-2 rounded-xl py-2.5 text-xs font-semibold uppercase tracking-widest text-white transition-opacity hover:opacity-90",style:{backgroundImage:"linear-gradient(90deg, #FF3478, #FF4D2A)"},children:[l.jsx(yy,{size:13}),"Watch a Video"]}),t&&l.jsx(qne,{src:"/videos/passive-listening.mp4",onClose:()=>e(!1)})]})},$ne=()=>{const[t,e]=I.useState(0),n=[{num:"01",label:"Select Segment",desc:"Choose the audience you want to probe"},{num:"02",label:"Define Goal",desc:"Set the insight objective and depth"},{num:"03",label:"Launch AI Interviews",desc:"Deploy via WhatsApp, Phone, or RCS"}];return I.useEffect(()=>{const i=setInterval(()=>{e(r=>(r+1)%n.length)},1800);return()=>clearInterval(i)},[]),l.jsxs("div",{className:"rounded-2xl bg-[#150835] p-5 shadow-lg h-full flex flex-col",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-gray-400 mb-4",children:"3-Click Campaign Builder"}),l.jsx("div",{className:"flex gap-1 mb-6",children:n.map((i,r)=>l.jsx("div",{className:"flex-1 h-1 rounded-full overflow-hidden bg-white/10",children:l.jsx(me.div,{className:"h-full rounded-full",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"},animate:{width:r<=t?"100%":"0%"},transition:{duration:.4,ease:"easeOut"}})},r))}),l.jsx("div",{className:"space-y-3 flex-1",children:n.map((i,r)=>l.jsxs(me.div,{className:`rounded-xl p-3.5 flex items-start gap-3 transition-all duration-300 ${r===t?"bg-white/10 border border-white/20":r<t?"bg-white/5 border border-white/5":"bg-transparent border border-white/5"}`,animate:{opacity:r<=t?1:.35},transition:{duration:.3},children:[l.jsx("div",{className:"shrink-0 w-6 h-6 rounded-full flex items-center justify-center text-[8px] font-bold",style:r<=t?{background:"linear-gradient(135deg, #FF3478, #FF4D2A)",color:"white"}:{background:"rgba(255,255,255,0.08)",color:"#666"},children:r<t?"✓":i.num}),l.jsxs("div",{children:[l.jsx("p",{className:`text-[11px] font-semibold ${r<=t?"text-white":"text-gray-600"}`,children:i.label}),l.jsx("p",{className:`text-[9px] mt-0.5 ${r===t?"text-gray-300":"text-gray-600"}`,children:i.desc})]})]},r))}),l.jsxs("div",{className:"mt-5 rounded-xl bg-white/5 p-3",children:[l.jsx("p",{className:"text-[9px] uppercase tracking-wider text-gray-500 mb-2",children:"Deploy via"}),l.jsx("div",{className:"flex gap-2",children:["WhatsApp","Phone","RCS"].map(i=>l.jsx("span",{className:"rounded-full px-2.5 py-1 text-[9px] font-medium text-white/70 border border-white/15",children:i},i))})]}),l.jsxs("button",{className:"mt-4 w-full flex items-center justify-center gap-2 rounded-xl py-2.5 text-xs font-semibold uppercase tracking-widest text-white transition-opacity hover:opacity-90",style:{backgroundImage:"linear-gradient(90deg, #FF3478, #FF4D2A)"},children:[l.jsx(yy,{size:13}),"Watch a Video"]})]})},Yne=[{Icon:sf,title:"Hybrid Discovery Loop",desc:"Automatically triggers deep-dive interviews the moment a friction point is detected in your call data."},{Icon:xy,title:"Adaptive AI Interviewers",desc:'Dynamic, two-way conversations that ask smart follow-ups to uncover the "why" at massive scale.'},{Icon:h3,title:"Autonomous Action Triggers",desc:'Real-time alerts via Slack/CRM when the AI detects churn risks or "red flag" emotions in any channel.'},{Icon:f3,title:"Vertical Expert Personas",desc:"Specialized AI agents (IT, CX, Sales) that interview with the technical depth of a senior industry analyst."},{Icon:_B,title:"Automated Hypothesis Testing",desc:"Prove or disprove business assumptions by targeting specific segments with AI-led research missions."},{Icon:CB,title:"Roadmap-Ready Priorities",desc:'Transforms raw noise into a ranked "To-Do" list of strategic actions for your Product and Sales teams.'}],Qne=[{category:"Call Center",items:["Genesys","Five9","Avaya"]},{category:"Ticketing / Chat",items:["Zendesk","Intercom","WhatsApp"]},{category:"Enterprise",items:["Email","Salesforce","Dynamics"]}],Kne=[{category:"CRM",items:["Salesforce","Dynamics","Pipedrive"]},{category:"Collaboration",items:["Slack","Microsoft Teams"]},{category:"Direct",items:["Email Reports","Custom Webhooks"]}],Zne=[{Icon:TB,title:"Multitopic Dashboards",desc:"A holistic, always-on view of enterprise sentiment across every vertical and channel."},{Icon:PS,title:"Automated Reports",desc:"Tailor-made vertical reports delivered automatically via Email, Slack, or Teams."},{Icon:h3,title:"Deterministic Alerts",desc:"Direct CRM or ticketing sync to trigger immediate, high-priority business actions."}],Jne=()=>{const{openCalendar:t}=pc();return l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx(mn,{title:"Lexic Platform - AI-Moderated Interviews and Conversation Analysis",description:"Turn Call Center Calls and Chat Messages into Actionable Insights. AI-Moderated Interviews via WhatsApp, Phone and RCS at scale."}),l.jsx(un,{}),l.jsx("section",{className:"relative w-full min-h-screen overflow-hidden bg-gradient-to-br from-[#FF3478] via-[#FF4D2A] to-[#FF6B35] flex items-end",children:l.jsxs("div",{className:"relative z-10 flex flex-col justify-end px-8 md:px-20 pb-24 max-w-6xl",children:[l.jsx(me.span,{className:"text-white/80 text-xs md:text-sm uppercase tracking-[0.3em] font-medium mb-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:"LEXIC PULSE"}),l.jsx(me.h1,{className:"text-4xl md:text-6xl lg:text-7xl font-light text-white leading-[1.1] mb-6 max-w-4xl",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.4},children:"Turning Every Conversation into a High-Fidelity Growth Asset"}),l.jsx(me.p,{className:"text-white/70 text-base md:text-lg max-w-2xl font-light",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.6},children:"Converting multi-modal human conversations into high-fidelity knowledge and deterministic execution."})]})}),l.jsx("section",{className:"bg-white py-20 md:py-32 px-8 md:px-20",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs(me.div,{className:"mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[l.jsx("span",{className:"text-xs uppercase tracking-[0.3em] font-medium",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"LEXIC PULSE"}),l.jsx("h2",{className:"text-3xl md:text-5xl font-light text-[#150835] leading-tight mt-3",children:"The Dual Intelligence Hub"}),l.jsx("div",{className:"mt-4 h-1 w-16 rounded-full",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"}})]}),l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10",children:[l.jsxs(me.div,{className:"rounded-3xl bg-slate-50 p-8 md:p-10 flex flex-col",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5},children:[l.jsx("p",{className:"text-sm font-semibold uppercase tracking-widest mb-1",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"01 | Passive Listening"}),l.jsx("h3",{className:"text-xl md:text-2xl font-light text-[#150835] mb-2",children:"100% Visibility of Existing Conversations"}),l.jsx("p",{className:"text-sm text-gray-500 leading-relaxed mb-8 max-w-md",children:"Connect directly to your Call Center, Zendesk, and Chat streams to analyze 100% of your interactions. We tag, summarize, and synthesize every word into high-fidelity knowledge and actionable insights for all your stakeholders"}),l.jsx("div",{className:"flex-1 min-h-[320px]",children:l.jsx(Xne,{})})]}),l.jsxs(me.div,{className:"rounded-3xl bg-violet-50/60 p-8 md:p-10 flex flex-col",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.5,delay:.1},children:[l.jsx("p",{className:"text-sm font-semibold uppercase tracking-widest mb-1",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"02 | Active Listening"}),l.jsx("h3",{className:"text-xl md:text-2xl font-light text-[#150835] mb-2",children:"AI-Moderated Interviews"}),l.jsxs("p",{className:"text-sm text-gray-500 leading-relaxed mb-8 max-w-md",children:["Create AI interviews in just 3 clicks. Deploy generative agents via WhatsApp, Phone, or RCS to dig deep into customer motivations, frustrations, and NPS drivers — discover ",l.jsx("a",{href:"/the-signal/nps-lagging-indicator-churn",className:"text-[#FF3478] hover:underline",children:"Why NPS is a lagging indicator"}),"."]}),l.jsx("div",{className:"flex-1 min-h-[320px]",children:l.jsx($ne,{})})]})]}),l.jsx(me.div,{className:"flex justify-end mt-12",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:l.jsxs("button",{onClick:t,className:"group relative flex items-center gap-2 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white overflow-hidden transition-all duration-300",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},children:[l.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 transition-opacity duration-300 rounded-full"}),"Book a Demo",l.jsx(qr,{size:16,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})}),l.jsxs("section",{className:"relative py-20 md:py-28 px-8 md:px-20 overflow-hidden",style:{background:"#150835"},children:[l.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] rounded-full opacity-20 pointer-events-none",style:{background:"radial-gradient(circle, rgba(255,52,120,0.4) 0%, transparent 70%)"}}),l.jsx("div",{className:"max-w-7xl mx-auto relative z-10",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-12 md:gap-16 items-center",children:[l.jsxs(me.div,{initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"flex flex-col gap-6",children:[l.jsx("span",{className:"text-xs uppercase tracking-[0.3em] font-semibold w-fit px-3 py-1 rounded-full",style:{background:"rgba(255,77,42,0.15)",color:"#FF4D2A"},children:"AI Voice Agent"}),l.jsxs("h2",{className:"text-3xl md:text-5xl font-bold text-white leading-tight",children:["Talk to our CEO",l.jsx("br",{}),"AI Avatar"]}),l.jsx("p",{className:"text-white/70 text-lg leading-relaxed max-w-md",children:"Understand our value proposition in a live conversation with an AI-powered version of our CEO. Ask anything about Lexic's technology, use cases, and vision."}),l.jsxs("button",{onClick:()=>{const e=document.querySelector('[aria-label="Abrir widget de llamada"]');e&&(e.click(),setTimeout(()=>{const n=document.querySelector('[aria-label="English"]');n==null||n.click()},300))},className:"group relative flex items-center gap-2 rounded-full px-8 py-3.5 text-sm font-medium text-white overflow-hidden transition-all duration-300 w-fit mt-2",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},children:[l.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 transition-opacity duration-300 rounded-full"}),l.jsx(xy,{size:18}),"Start a Conversation",l.jsx($0,{size:16,className:"transition-transform duration-300 group-hover:translate-x-1"})]})]}),l.jsx(me.div,{initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6,delay:.15},className:"flex justify-center",children:l.jsxs("div",{className:"relative",children:[l.jsx("div",{className:"absolute -inset-1 rounded-2xl opacity-60 blur-lg",style:{background:"linear-gradient(135deg, #FF3478, #FF8401)"}}),l.jsxs("div",{className:"relative rounded-2xl overflow-hidden border border-white/10 bg-white/5 backdrop-blur-sm",style:{width:320,height:400},children:[l.jsx("img",{src:e4,alt:"Sergio Llorens – CEO AI Avatar",className:"w-full h-full object-cover object-top"}),l.jsxs("div",{className:"absolute bottom-4 left-4 right-4 flex items-center gap-3 rounded-xl px-4 py-3",style:{background:"rgba(21,8,53,0.85)",backdropFilter:"blur(8px)"},children:[l.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-green-400 animate-pulse"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-white text-sm font-semibold",children:"Sergio Llorens"}),l.jsx("p",{className:"text-white/60 text-xs",children:"CEO AI Avatar · Online"})]})]})]})]})})]})})]}),l.jsx("section",{className:"bg-slate-50 py-20 md:py-32 px-8 md:px-20",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs(me.div,{className:"mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[l.jsx("span",{className:"text-xs uppercase tracking-[0.3em] font-medium",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"What It Does"}),l.jsx("h2",{className:"text-3xl md:text-5xl font-light text-[#150835] leading-tight mt-3",children:"Key Capabilities"}),l.jsx("div",{className:"mt-4 h-1 w-16 rounded-full",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"}})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Yne.map(({Icon:e,title:n,desc:i},r)=>l.jsxs(me.div,{className:"bg-white rounded-2xl p-8 shadow-sm border border-slate-100 flex flex-col gap-4",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.45,delay:r*.07},children:[l.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{background:"linear-gradient(135deg, #FF3478 0%, #FF4D2A 100%)"},children:l.jsx(e,{size:18,className:"text-white"})}),l.jsx("h3",{className:"text-base font-semibold text-[#150835]",children:n}),l.jsx("p",{className:"text-sm text-gray-500 leading-relaxed",children:i})]},n))})]})}),l.jsx("section",{className:"py-20 md:py-32 px-8 md:px-20",style:{background:"#150835"},children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs(me.div,{className:"mb-14",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[l.jsx("span",{className:"text-xs uppercase tracking-[0.3em] font-medium",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Delivery Philosophy"}),l.jsx("h2",{className:"text-3xl md:text-5xl font-light text-white leading-tight mt-3",children:"Value, Not Just Data"}),l.jsx("div",{className:"mt-4 h-1 w-16 rounded-full",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)"}}),l.jsx("p",{className:"mt-6 text-white/60 text-base md:text-lg font-light max-w-2xl",children:"We do the heavy lifting of analysis and filtering so you receive pure value where your team already works."})]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:Zne.map(({Icon:e,title:n,desc:i},r)=>l.jsxs(me.div,{className:"rounded-2xl border border-white/10 bg-white/5 p-8 flex flex-col gap-5",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.45,delay:r*.1},children:[l.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center",style:{background:"linear-gradient(135deg, #FF3478 0%, #FF4D2A 100%)"},children:l.jsx(e,{size:18,className:"text-white"})}),l.jsx("h3",{className:"text-lg font-semibold",style:{background:"linear-gradient(90deg, #FF3478, #FF8401)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:n}),l.jsx("p",{className:"text-sm text-white/60 leading-relaxed",children:i})]},n))})]})}),l.jsx("section",{className:"bg-white py-20 md:py-32 px-8 md:px-20",children:l.jsxs("div",{className:"max-w-7xl mx-auto",children:[l.jsxs(me.div,{className:"mb-14 text-center",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[l.jsx("span",{className:"text-xs uppercase tracking-[0.3em] font-medium",style:{background:"linear-gradient(90deg, #FF3478, #FF4D2A)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Connectivity"}),l.jsx("h2",{className:"text-3xl md:text-5xl font-light text-[#150835] leading-tight mt-3",children:"The Integration Ecosystem"}),l.jsx("p",{className:"mt-4 text-gray-500 text-base md:text-lg font-light max-w-xl mx-auto",children:"Plug-and-play with your existing stack."})]}),l.jsxs("div",{className:"flex flex-col lg:flex-row items-start gap-8 lg:gap-6",children:[l.jsx(me.div,{className:"flex-1 w-full",initial:{opacity:0,x:-30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5},children:l.jsxs("div",{className:"rounded-2xl bg-slate-50 border border-slate-100 p-7",children:[l.jsxs("p",{className:"text-xs font-semibold uppercase tracking-[0.25em] text-[#150835] mb-6",children:["Conversational Sources"," ",l.jsx("span",{className:"ml-2 text-[10px] normal-case tracking-normal font-normal text-gray-400",children:"Input"})]}),l.jsx("div",{className:"space-y-5",children:Qne.map(({category:e,items:n})=>l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] uppercase tracking-widest text-gray-400 mb-2",children:e}),l.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(i=>l.jsx("span",{className:"rounded-full border border-[#FF3478]/30 bg-[#FF3478]/5 px-3 py-1 text-xs font-medium text-[#FF3478]",children:i},i))})]},e))})]})}),l.jsxs("div",{className:"hidden lg:flex flex-col items-center justify-center self-center gap-3 shrink-0 px-2",children:[l.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center shadow-md",style:{background:"linear-gradient(135deg, #FF3478, #FF4D2A)"},children:l.jsx($0,{size:20,className:"text-white"})}),l.jsxs("span",{className:"text-[10px] uppercase tracking-widest text-gray-400 text-center",children:["Lexic",l.jsx("br",{}),"Engine"]})]}),l.jsx("div",{className:"flex lg:hidden items-center justify-center w-full",children:l.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center shadow-md rotate-90",style:{background:"linear-gradient(135deg, #FF3478, #FF4D2A)"},children:l.jsx($0,{size:18,className:"text-white"})})}),l.jsx(me.div,{className:"flex-1 w-full",initial:{opacity:0,x:30},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5},children:l.jsxs("div",{className:"rounded-2xl bg-[#150835] border border-white/10 p-7",children:[l.jsxs("p",{className:"text-xs font-semibold uppercase tracking-[0.25em] text-white mb-6",children:["Insights & Triggers"," ",l.jsx("span",{className:"ml-2 text-[10px] normal-case tracking-normal font-normal text-white/40",children:"Output"})]}),l.jsx("div",{className:"space-y-5",children:Kne.map(({category:e,items:n})=>l.jsxs("div",{children:[l.jsx("p",{className:"text-[10px] uppercase tracking-widest text-white/40 mb-2",children:e}),l.jsx("div",{className:"flex flex-wrap gap-2",children:n.map(i=>l.jsx("span",{className:"rounded-full border border-white/20 bg-white/10 px-3 py-1 text-xs font-medium text-white/80",children:i},i))})]},e))})]})})]}),l.jsx(me.div,{className:"flex justify-center mt-14",initial:{opacity:0,y:10},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:l.jsxs("button",{onClick:t,className:"group relative flex items-center gap-2 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white overflow-hidden transition-all duration-300",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},children:[l.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 transition-opacity duration-300 rounded-full"}),"Book a Demo",l.jsx(qr,{size:16,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})}),l.jsx("section",{className:"bg-white px-8 md:px-20 py-20 md:py-32",children:l.jsx("div",{className:"max-w-7xl mx-auto",children:l.jsxs(me.div,{className:"rounded-2xl bg-[#150835] py-16 md:py-24 px-8 flex flex-col items-center text-center",initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[l.jsx("h3",{className:"text-2xl md:text-4xl font-light text-white leading-tight mb-4 max-w-lg",children:"Contact us to explore partnering with Lexic"}),l.jsx("p",{className:"text-white/50 text-sm mb-10 max-w-sm",children:"Book a demo and see the platform in action with your own data."}),l.jsxs("button",{onClick:t,className:"group flex items-center gap-2 border border-white/40 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.2em] text-white hover:bg-white hover:text-[#150835] transition-colors duration-300",children:["Contact",l.jsx(qr,{size:14,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})]})})}),l.jsx(dn,{})]})},eie="2026-02-18",tie="1.0",nie={en:[{id:13,title:"Beyond the Hype: What 100 C-Levels Confessed to Our AI About Real GenAI Usage",slug:"c-level-ai-study",excerpt:"A massive qualitative analysis: +400 minutes of AI-moderated conversation reveal the 'operational truth' of Spanish enterprise GenAI adoption. Discover 4 critical findings about trust, Shadow AI, and the executive use paradox.",content:"What happens when you ask 100 C-Level executives to honestly discuss their real AI usage? Our pioneering AI-moderated study reveals guerrilla adoption, pragmatic skepticism, and a functional paradox.",fullContent:null,author:"C-Level Studio",date:"2025-12-12",category:"Resource",readTime:"12 min read",featured:!0},{id:16,title:"Best AI Tools for Customer Interviews 2025: Lexic Pulse vs. Outset vs. Marvin",slug:"best-ai-tools-customer-interviews-2025",excerpt:"The era of waiting 8 weeks and spending $50k for a focus group is over. Executive comparison of the three leaders in AI-powered customer research.",content:"Compare Lexic Pulse, Outset.ai, and Marvin to find the best AI tool for customer research, UX testing, or research repository needs.",fullContent:`Best AI Tools for Customer Interviews 2025: Lexic Pulse vs. Outset vs. Marvin
The era of waiting 8 weeks and spending $50k for a focus group is over. The "User Research" category has split into three distinct paths: Active AI Interviewers (who do the work for you), Unmoderated Video Tools (for UX), and Research Repositories (for storage).
This guide compares the three leaders in these respective sub-categories—Lexic Pulse, Outset, and Marvin—to help Heads of Insights and CMOs choose the right engine for their data strategy.
---
## Executive Summary for Quick Decision Making
If you are evaluating AI tools for customer research, the choice depends on your specific bottleneck:
**Best for replacing traditional market research & recruiting: Lexic Pulse.** It is the only platform that combines active outbound AI interviewing (via Phone/WhatsApp) with instant access to a 6-million-person global panel.
**Best for unmoderated UX/Video feedback: Outset.ai.** Ideal for product teams needing visual reactions to prototypes.
**Best for analyzing human-led interviews: Marvin.** Acts as a central repository and assistant for interviews your team conducts manually.
---
## 1. Lexic Pulse: The "Active" Market Research Replacement
**Best for:** Consumer Insights, Customer Experience (CX) at Scale, and replacing expensive research agencies.
Lexic Pulse is not just a tool; it is an autonomous research agent. Unlike platforms that require you to bring your own users or rely on passive web links, Lexic Pulse solves the two hardest parts of research: Recruiting and Interviewing.
### The Strategic Differentiator: The 6M+ Panel & Voice Capabilities
Lexic Pulse is the only platform in this comparison that integrates access to a vetted panel of over 6 million participants (B2B & B2C) across 150+ demographic filters.
Furthermore, Lexic Pulse engages users where they actually are: on the phone.
- **Active Outbound Interviews:** Lexic's AI can call customers via phone or engage via WhatsApp. This yields significantly higher response rates than email-based video links.
- **Depth at Scale:** The AI conducts 15-20 minute adaptive interviews, probing "why" a customer feels a certain way, effectively simulating a human moderator at infinite scale.
### Pros
- Integrated Recruitment: Launch a study to 500 "HR Managers in the UK" and get results in 48 hours without an external agency.
- Multichannel: Voice calls, WhatsApp, and Web embedding.
- No "App" Required: Participants don't need to download software or sit in front of a webcam.
- Cost Efficiency: Replaces both the recruiting agency and the human interviewer.
### Cons
- Focused on audio/text insights, less emphasis on video analysis than Outset.
---
## 2. Outset.ai: The Visual UX Specialist
**Best for:** Product Designers and UX Researchers testing visual prototypes.
Outset focuses heavily on the visual aspect of research. It uses AI to conduct video-based interviews where participants respond to questions via webcam. It is particularly effective for "Concept Testing" where seeing the user's face or screen is necessary.
### The Strategic Differentiator: AI-Moderated Video
Outset allows researchers to upload a prototype, and the AI will guide a participant through it, asking follow-up questions based on their answers.
### Pros
- Visual Context: Great for seeing user reactions to designs.
- AI Follow-ups: Moves beyond static video surveys by asking clarifying questions.
- Synthesis: Good at summarizing video transcripts.
### Cons
- Recruitment Friction: You generally need to bring your own users or use a separate integration.
- Device Friction: Requires users to be on a device with a camera and willing to be recorded on video, which can lower participation rates compared to voice/chat.
---
## 3. Marvin (HeyMarvin): The Research Repository
**Best for:** Research Operations (ReOps) and organizing data from human-led interviews.
Marvin differs fundamentally from Lexic Pulse and Outset. Marvin doesn't usually "do" the interview for you; it helps you manage the interviews you do. It records, transcribes, and organizes meetings from Zoom, Teams, or Google Meet.
### The Strategic Differentiator: The Central Library
Marvin is a "Repository." It is designed to be the single source of truth for all research data accumulated by a company over time. Its AI features focus on searching through past interviews to find patterns.
### Pros
- Deep Integration: Connects seamlessly with calendar and conferencing tools.
- Repository: Excellent for storing years of research data.
- Analysis: Good for analyzing interviews conducted by human researchers.
### Cons
- Not a Scalability Tool: It doesn't scale the collection of data. If you need 500 interviews, you still need humans to conduct them (or feed them in).
- Passive: It organizes data you already have; it doesn't actively go out and hunt for new market insights.
---
## Comparison Table: Features & Capabilities
| Feature | Lexic Pulse | Outset.ai | Marvin |
|---------|-------------|-----------|--------|
| Primary Category | Active AI Interviewer & Recruiter | AI-Moderated Video Surveys | Research Repository & Assistant |
| Recruitment | Integrated (6M+ Panel) | External / Integrations | External (BYO Users) |
| Primary Channels | Phone Call (Voice), WhatsApp, Web | Web-based Video | Zoom, Teams, G-Meet (Recordings) |
| Best Use Case | Market Research, CX, Churn Analysis | UX Testing, Prototype Feedback | Storing & Analyzing Human Interviews |
| Scalability | High (Unlimited concurrent interviews) | High (Asynchronous video) | Low (Dependent on human schedule) |
| Setup Speed | < 24 Hours (from setup to insight) | Days (depending on recruitment) | N/A (Repository tool) |
---
## The Verdict: Which AI Tool Should You Choose?
The decision comes down to whether you need to generate new insights or organize existing ones.
**Choose Marvin if:**
You have a dedicated team of human researchers conducting high-touch interviews and you need a place to store, tag, and search that data.
**Choose Outset if:**
You are a Product Designer specifically needing to see a user's face while they interact with a Figma prototype.
**Choose Lexic Pulse if:**
You are a CMO, Head of CX, or Product Leader who needs to replace slow, expensive market research. If your goal is to "download" the opinions of 1,000 specific professionals or consumers into a dashboard over the weekend—without hiring a recruiting agency or spending weeks coordinating schedules—Lexic Pulse is the superior strategic choice.
---
## Stop guessing. Start understanding.
See how Lexic Pulse can replace your market research agency and deliver insights in 48 hours.
**[Get a Demo of Lexic Pulse](https://meetings.hubspot.com/sergio-llorens-rubio)**`,author:"Lexic Team",date:"2025-12-29",category:"Resource",readTime:"12 min read",featured:!1,externalUrl:"/blog/best-ai-tools-customer-interviews-2025"},{id:15,title:"Stop Sifting. Start Closing. Automate Lead Pre-Qualification with AI",slug:"automate-lead-pre-qualification-ai-bdr",excerpt:"Your BDRs spend 80% of their time chasing 'ebook collectors.' Use Lexic Pulse to engage, vet, and qualify leads instantly, 24/7.",content:"Marketing generates the leads, but Sales struggles to close them. Learn how AI Presales Agents can triple your pipeline velocity by qualifying leads automatically.",fullContent:`Stop Sifting. Start Closing. Automate Lead Pre-Qualification with AI.
Your BDRs spend 80% of their time chasing "ebook collectors." Use Lexic Pulse to engage, vet, and qualify leads instantly, 24/7.
**[Triple Your Pipeline Velocity](https://meetings.hubspot.com/sergio-llorens-rubio/lexic-sales-contact)**
---
## Why is the Traditional MQL Broken?
Marketing generates the leads, but Sales struggles to close them. Why? Because your expensive, highly-trained BDRs are facing three critical bottlenecks:
**The Speed Problem:** It takes 24-48 hours for a human to follow up. By then, the lead is cold.
**The "Sifting" Problem:** 90% of leads are "ebook collectors" or bad fits. BDRs waste days manually filtering them.
**The Intent Gap:** A Job Title tells you who they are, not if they are ready to buy.
### Key Insight
We treat a student downloading a whitepaper the same as a VP of Ops with a budget. You aren't just missing feedback; you are missing the buying signal.
---
## How AI Presales Agents Work
### Q: What is an AI BDR?
**A:** An AI BDR (Business Development Representative) is an automated system that engages inbound leads immediately upon conversion. Unlike a static chatbot, Lexic Pulse initiates a proactive, empathetic 2-minute micro-conversation via Chat or Voice to determine fit before a human ever touches the lead.
### Q: How does Lexic Pulse qualify leads automatically?
**A:** The process follows a simple 3-step loop:
**1. Converse (Outreach):** The AI instantly engages the lead (via WhatsApp, Web, or Voice) at the peak of their interest.
**2. Analyze (Qualification):** It asks adaptive questions to verify Authority, Need, Urgency, and Budget in real-time.
**3. Act (Handoff):** It routes the lead based on quality—booking meetings for hot leads or nurturing warm ones.
---
## Transform Your CRM from a Database to a Decision Engine
Lexic Pulse doesn't just pass a lead; it passes a structured insight. We replace generic "Contact Us" form data with precise tags based on the qualification conversation.
### Data Enrichment Table
| Lead Status | AI Analysis Criteria | Automated Action |
|-------------|---------------------|------------------|
| HOT_LEAD | High Intent + Solvable Pain + Has Budget | Book Meeting Instantly |
| WARM_LEAD | Right Persona + Information Gathering | Add to Nurture Flow |
| BAD_FIT | Student / No Budget / Wrong Tech Stack | Disqualify & Archive |
---
## The Efficiency Shift
### The "Sifting" Team (Manual)
5 BDRs chase 1,000 MQLs. They spend 80% of their time leaving voicemails and sending "just checking in" emails to find 20 meetings.
### The "Closing" Team (AI-Powered)
Lexic Pulse qualifies all 1,000 leads instantly. It filters out the 900 bad fits. Your 5 BDRs spend 100% of their time on the 100 hottest leads.
---
## Frequently Asked Questions about AI Lead Qualification
### Q: Does Lexic Pulse replace human sales teams?
**A:** No. It replaces the manual drudgery of "sifting." It allows your human sales team to live in a different reality where they only speak to leads who are qualified and ready to buy.
### Q: What happens to disqualified leads?
**A:** They are politely managed and archived, ensuring your CRM remains clean and your sales team remains focused.
---
## Qualify Your Next 100 Leads on Autopilot
Don't settle for generic demos. Let's run a "Pipeline Diagnostic" on your existing lead sources and see how many hidden opportunities we can uncover.
**[Start My Pipeline Diagnostic](https://meetings.hubspot.com/sergio-llorens-rubio/lexic-sales-contact)**`,author:"Lexic Team",date:"2025-12-05",category:"Sales & Lead Generation",readTime:"10 min read",featured:!1},{id:14,title:"From Data Lake to Cultural Engine: Turn Static CRM Records into Living Insights",slug:"data-lake-cultural-engine-crm-living-insights",excerpt:"Stop settling for the 'What.' Use AI to discover the 'Why' behind every customer interaction and fill the 'Silent Gap' in your data.",content:"We are drowning in data but starving for understanding. Learn how to transform static CRM records into living insights with AI-driven micro-conversations.",fullContent:`From Data Lake to Cultural Engine: Turn Static CRM Records into Living Insights
Stop settling for the "What." Use AI to discover the "Why" behind every customer interaction and fill the "Silent Gap" in your data.
**[Request Strategic Demo](https://meetings.hubspot.com/sergio-llorens-rubio/lexic-sales-contact)**
## The Modern CRM Dilemma
We are drowning in data but starving for understanding. Most enterprises hold millions of first-party data records, yet they face a critical "Silent Gap."
**We know the "WHAT":** Visit frequency, code scans, and promo participation.
**We ignore the "WHY":** Who are they really? What are their passion points? What music moves them? What memes do they share?
### Key Insight
Standard static questionnaires yield low response rates (<8%) and generic data. It's time to move from interrogation to conversation.
## Lexic Pulse: Your Automated "Cool Hunter" at Scale
Lexic Pulse acts as an empathic researcher that engages millions of users simultaneously. We replace cold forms with AI-driven micro-conversations via Voice and WhatsApp, understanding the consumer's life moment in real-time.
### How It Works
**1. The Trigger:** Your system detects a key moment—like a user inactive for 30 days—and pings Lexic Pulse.
**2. The Capture:** Our AI executes a dynamic interview adapted to the segment. It transcribes, analyzes sentiment, and extracts cultural entities instantly.
**3. The Enrichment:** Lexic Pulse returns Structured Attributes mapped to your custom Schema, not just raw text.
## From Voice to Structured Schema
We transform unstructured conversations into actionable CRM fields ready for segmentation the very next day.
| CRM Field Group | Value from Lexic Pulse | Marketing Application |
|-----------------|------------------------|----------------------|
| Passion Point | Urban Music / Sustainable Cooking | Creative Personalization |
| Trend Affinity | High (Early Adopter) | Product Offer Selection |
| Brand Driver | Nostalgia / Social Status | Email Copywriting Strategy |
| Sentiment Risk | True / False | Alert for Customer Care |
## Radical Timeliness & Depth at Scale
### Depth at Scale
Maintain the reach of millions of users but with the qualitative depth of a Focus Group.
### Radical Timeliness
Culture moves faster than surveys. Detect trends and mood shifts in real-time (e.g., immediate reaction to a new ad or meme).
## Don't Just Collect Data. Build a Cultural Engine.
Enrich your quantitative data with deep qualitative insights today.
**[Start Your Cultural Engine - Request Strategic Demo](https://meetings.hubspot.com/sergio-llorens-rubio/lexic-sales-contact)**`,author:"Lexic Team",date:"2025-11-28",category:"CRM & Data Enrichment",readTime:"8 min read",featured:!1},{id:12,title:"The 9,900% ROI of Customer Research (And Why Slow, Traditional Methods Fail to Capture It)",slug:"9900-roi-customer-research-slow-traditional-methods-fail",excerpt:"The value of customer research is a strategic imperative with 9,900% ROI. Discover 5 core statistics that prove the quantifiable return and why traditional methods like 8-week focus groups can't unlock this massive potential.",content:"Customer research delivers 9,900% ROI, but slow traditional methods lock this value behind time and budget walls. Learn why speed matters and how AI-powered research unlocks the astronomical return.",fullContent:`# The Non-Negotiable ROI of Customer Research: 5 Statistics That Define Business Success
The value of customer research (UX, CX, and Market Research) is no longer a debate. It's a strategic imperative that directly dictates revenue growth, market competitiveness, and operational efficiency.
However, the method of research is where most organizations fail.
Business leaders, CMOs, and Heads of Insights know they need customer understanding. But they are often forced to rely on tools that are too slow and too expensive—like 8-week focus groups or costly external consulting panels.
This locks the massive potential ROI of research behind a wall of time and budget. For leaders asking if traditional research is truly "worth it," the data provides a definitive answer: the value is there, but your old methods can't unlock it.
Here are 5 core statistics that demonstrate the quantifiable return on investment (ROI) and the crippling cost of slow insights.
## 1. The Astronomical Return: Every $1 Invested Yields $100
The return on investment (ROI) for focusing on the user and customer experience (UX/CX) is one of the highest available to any organization.
**The Core Stat:** For every dollar ($1) invested in User Experience (UX), businesses see an average return of $100. This represents an ROI of 9,900%.
**The Strategic Gap:** This 9,900% ROI isn't a lump sum returned from a single, massive study. It's the compounded value of agile, iterative improvements. It's the return on speed. Traditional, slow-moving research projects that take months to complete cannot deliver this kind of iterative value.
## 2. The Growth Driver: 5.7x Higher Revenue
Companies that systematically prioritize customer research significantly outperform their peers. This proves that deep customer understanding is a fundamental driver of sustainable growth.
**The Core Stat:** CX leaders achieve average revenue growth of 17% over five years. In stark contrast, CX laggards achieve just 3% growth during the same period. This is a 5.7x difference in growth rates.
**The Core Stat:** Organizations that prioritize user research see 2.8x more revenue and 5x better brand perception.
**The Strategic Gap:** The "CX leaders" are those with a continuous pulse on their customers. The "laggards" are those waiting for a quarterly focus group report. The 5.7x growth gap isn't just about if you do research; it's about the velocity of your insights.
## 3. The Real-Time Cost of Neglect: $3.7 Trillion at Risk
The cost of not understanding customers manifests as massive, measurable revenue destruction. This isn't a future risk; it's a daily operational loss.
**The Core Stat:** Organizations worldwide risk $3.7 trillion annually due to bad customer experiences.
**The Core Stat:** As a direct consequence, 32% of customers will cease doing business with a brand they loved after just one bad experience.
**The Strategic Gap:** "One bad experience" happens in seconds. An 8-week study cannot prevent this. When your customer insight loop is measured in months, you are accepting daily losses. This $3.7 trillion risk can only be mitigated with on-demand, real-time insights that identify points of friction as they happen.
## 4. The 100x Rework Cost: The Price of Guessing
Investing in research before and during development acts as a preventative measure against exponentially higher costs later in the product lifecycle.
**The Core Stat:** The cost of fixing an error or usability problem after development is 100x more expensive than fixing it before development.
**The Core Stat:** Developers spend roughly 50% of their time on avoidable rework.
**The Strategic Gap:** This stat is entirely about pre-development validation. Traditional research methods present a strategic nightmare: either you wait 6-8 weeks for panel insights (and lose all speed to market), or you build on assumptions (and risk the 100x rework cost).
This is a false choice. The solution is research that moves at the speed of development, allowing you to recruit a specific panel and get deep insights in 24 hours, not 24 days.
## 5. The Silent Churn: 91% of Unhappy Customers Just Leave
Relying on direct complaints or internal assumptions is dangerous. Most dissatisfied customers churn silently, resulting in hidden, compounding financial and reputational damage.
**The Core Stat:** 91% of unsatisfied customers don't complain about their bad experience; they simply leave without providing feedback.
**The Core Stat:** A company that does make customer experience a priority can charge a premium of up to 16% for its products and services.
**The Strategic Gap:** The 91% who leave silently are the greatest source of missed opportunity. The gap between the 91% you're losing and the 16% premium you could be charging is the "Cost of Not Knowing Why." To capture this value, you need to proactively find these customers and get deep, qualitative insights at scale—something a 10-person focus group can't provide.
## The Strategic Imperative: Your Research Method Is Your Bottleneck
These five statistics paint a clear picture: customer understanding is a high-speed, high-stakes game. The potential ROI is astronomical, but the penalties for being slow are immediate and severe.
The problem is that traditional research methods—external panels, multi-week focus groups, and long-term consulting studies—are fundamentally unequipped for this reality. They are:
- **Too Slow:** Taking 6-8 weeks to get answers in a market that moves in days.
- **Too Expensive:** Costing tens or hundreds of thousands of dollars, limiting research to a few big "projects" per year.
- **Too Shallow:** Failing to integrate the "why" (qualitative) with the "what" (quantitative) at scale.
To achieve the 9,900% ROI, you must change the method. The future of research is moving from a slow, expensive project to a continuous, on-demand capability.
This requires a new model that provides the depth of qualitative research (like a focus group) at the speed and scale of quantitative analysis. It requires AI-powered agents that can have deep, adaptive conversations and analyze them in real time. It requires the ability to tap into a global panel of 6+ million participants with over 150+ segmentation filters and recruit your exact B2B or consumer audience in under 24 hours.
This is how you bridge the gap between the promise of research and the reality of your P&L.
## How to Achieve Real Research ROI: Key Questions Answered
**What is the true ROI of customer research?** The financial ROI is as high as 9,900% ($1 in, $100 out). Strategically, it drives 5.7x more revenue growth than competitors and can add a 16% price premium to your products.
**What is the real cost of not doing research?** The cost is a $3.7 trillion global risk, a 32% customer defection rate after one bad experience, a 100x higher development cost for rework, and the silent churn of 91% of your unhappy customers.
**What is the alternative to slow, traditional research like focus groups?** The alternative is agile, AI-powered research platforms. These tools provide on-demand access to highly-segmented global panels (both consumer and B2B) and use conversational AI to gather and analyze deep qualitative feedback in days, not months, at a fraction of the cost.`,author:"Lexic Team",date:"2025-11-04",category:"Customer Research",readTime:"15 min read",featured:!0},{id:10,title:"The Ultimate Guide: 10 Best Practices for Asking for Customer Feedback (and Getting Real Answers)",slug:"10-best-practices-customer-feedback-real-answers",excerpt:"Stop getting superficial feedback. Learn the 10 proven strategies to transform your surveys into valuable conversations that drive real business decisions and uncover the 'why' behind customer behavior.",content:"Traditional surveys are dead. Discover how to get authentic, deep, and scalable customer feedback through conversational AI and strategic questioning techniques that actually drive growth.",fullContent:`Every company wants to understand its customers. The problem is that traditional methods, like email surveys, have become ineffective. You get abysmal response rates, superficial data, and worst of all, you're left not knowing the **"why"** behind the answers.
To make smart business decisions, you need authentic, deep, and scalable feedback. This guide will teach you the **10 best practices** to transform your listening process and start getting the insights that truly drive growth.
## 1. What Exactly Do You Want to Know? Define a Clear Objective
Before you ask anything, ask yourself: **What business decision do I want to make with this information?** A vague goal like "to know what customers think" will get you vague answers.
**Focus on a specific objective:**
- **For Product**: "Understand why 70% of new users don't complete the onboarding process."
- **For CX**: "Discover the root cause of the recent 5-point drop in our NPS score."
- **For Marketing**: "Validate if our new campaign's message resonates emotionally with our target audience."
A clear objective allows you to design much more effective questions.
## 2. Choose the Perfect Moment for the Conversation
**When you ask is just as important as what you ask.** Don't ask for feedback on the purchase process two weeks after it happened. Do it in the moment, when the experience is fresh.
- **Post-purchase on an e-commerce site**: Was there any friction in the checkout process?
- **After an interaction with support**: Was the problem truly resolved?
- **During a SaaS onboarding**: What is the first thing that frustrates a new user?
Acting at the right moment dramatically increases relevance and response rates.
## 3. Go Where Your Customers Are: Use Their Preferred Channel
Why force a customer to leave WhatsApp to answer an email if that's where they spend their day? **Adapting to their communication channels** is a sign of respect for their time and multiplies the chances of getting a response. Consider channels like:
- **WhatsApp**: Ideal for quick, personal interactions with extremely high open rates.
- **Automated voice calls**: Perfect for capturing the real emotion and tone in the customer's voice.
- **Widgets on your website or app**: To get contextual feedback without interrupting the user's journey.
## 4. Respect Their Time: Keep It Short and Conversational
**Survey fatigue is real.** No one wants to face a form with 20 multiple-choice questions. The key is brevity and interaction.
A **2-3 minute conversation**, with a friendly and human tone, is perceived as a helpful chat, not a chore. This not only improves the completion rate but also the quality of the feedback received.
## 5. Prioritize Open-Ended Questions to Uncover the "Why"
Scores from 1 to 10 or closed-ended questions give you numbers, but not the full story. **The real value lies in the open-ended answers**, where customers use their own words to describe their frustrations, desires, and needs.
Instead of asking **"Are you satisfied with our service?"**, try **"What was the most surprising thing, for better or worse, about your experience with us today?"**.
## 6. Go Beyond Metrics: Seek Conversations, Not Just Scores
A **"7 out of 10"** on an NPS survey tells you nothing. Why a 7 and not a 6? Or an 8? Metrics like **NPS** or **CSAT** are the starting point, not the destination. True insight is born when you turn that score into a conversation.
This is where technology makes a difference. **Customer conversations** will always give you richer insights than a simple score. A **conversational AI** can dynamically ask: **"I see you gave us a 7. What could we have done to make your experience a 10?"**. This simple follow-up question unlocks a level of depth that traditional surveys cannot reach.
## 7. Personalize the Experience to Make Them Feel Heard
No one likes to feel like just another number in a CRM. **Use the information you already have** to personalize the interaction. **"Hi [Name], we see you've just used our new feature X. Could we ask you a couple of questions about your experience?"**.
Personalization shows that you value their specific opinion and that this isn't an impersonal, mass email blast.
## 8. Automate Listening, Not Empathy
**Automation is key to listening at scale**, but it shouldn't sound robotic. The new generation of **conversational AI tools** is designed to be empathetic, adapting the dialogue based on the user's responses.
If the AI detects a negative sentiment, it can dig deeper to understand the root cause of the problem. If it detects enthusiasm, it can ask what they liked the most. It's about **using technology to make listening more human**, not more distant.
## 9. Scale Your Qualitative Research Without Skyrocketing Costs
Tools like focus groups are invaluable for gathering customer feedback, but they are expensive, slow, and not very scalable. **How can you have those deep conversations with hundreds or thousands of customers** without a huge team of researchers?
This is where technology changes the game. You can use tools like **Lexic Pulse** to conduct **user interviews at scale**. Imagine launching a qualitative study with 500 people and having the results transcribed, analyzed, and categorized by topic and sentiment on a real-time dashboard the next day. **That's scaling your understanding.**
## 10. Close the Loop: Communicate and Act on the Feedback
**Collecting feedback and doing nothing with it is worse than not asking at all.** The final and most important step is to **"close the loop."** Inform your customers of the improvements you've implemented thanks to their suggestions.
A simple email like, **"You told us our checkout process was confusing. We've redesigned it. Thanks for your help,"** has an immense impact on loyalty and proves that listening is a core part of your culture.
## Ready to Start Truly Understanding?
Stop guessing and start understanding your customers—it's the biggest competitive advantage you can build. If you're ready to transform your cold surveys into valuable conversations, discover how **Lexic Pulse** helps you capture authentic feedback via voice or chat and turn it into smart business decisions in real time.
**[Request Your Personalized Demo and Discover What Your Customers Really Think]**
## Frequently Asked Questions (FAQ)
**What is conversational feedback?**
It's a method of collecting customer opinions through an interactive dialogue (via chat or voice) instead of a static form. It allows for dynamic follow-up questions to get deeper, more contextual answers.
**How can AI improve feedback response rates?**
AI enables the creation of short (2-3 minute), personalized interactions on the customer's preferred channel (e.g., WhatsApp). By reducing friction and making the experience more human and engaging, response rates increase by over 50% compared to traditional surveys.
**Is it really possible to analyze qualitative feedback at scale?**
Yes. Modern platforms like **Lexic Pulse** use AI and Natural Language Processing (NLP) to automatically transcribe, analyze, and classify hundreds or thousands of conversations in real time. The technology detects topics, intent, and sentiment, presenting the results on a visual dashboard and eliminating 90% of manual analysis time.`,author:"Lexic Team",date:"2025-01-05",category:"Customer Research",readTime:"18 min read",featured:!0},{id:9,title:"Is Your Product Roadmap Based on Guesswork? How to Get Real User Insights in 48 Hours",slug:"product-roadmap-guesswork-real-user-insights-48-hours",excerpt:"Every Product Manager faces the tension between shipping fast and building what users actually want. Discover a four-step framework to move from intuition to insight and build your roadmap based on real user feedback in just 48 hours.",content:"Stop building in the dark. Learn how AI-powered conversations can get you deep user insights at the speed your development sprints demand. From killer questions to continuous discovery loops.",fullContent:`Every Product Manager lives with a fundamental tension: the pressure to ship features faster versus the need to be certain you're building what users actually want. We often rely on quantitative data, but that only tells you **what** is happening. To understand the **why**, you need qualitative research—a process that is traditionally slow, expensive, and difficult to scale.
But what if you could break that trade-off? What if you could get deep, qualitative insights at the speed your development sprints demand? Here is a simple, **four-step framework** to move from intuition to insight and build a product roadmap based on real user feedback.
## Step 1: Frame Your "Killer Question"
Before you gather any feedback, you need focus. Instead of asking a broad question like "What do you think of our product?", pinpoint the single most critical unknown that is blocking a decision. For example:
- **"Why is the adoption of our new analytics feature so low?"**
- **"What is the single biggest point of friction in our user onboarding process?"**
- **"Which of these three proposed features would solve the most urgent problem for our power users?"**
Having a clear question ensures the feedback you get is not just interesting, but immediately actionable.
## Step 2: Automate Your User Interviews with AI
The biggest bottleneck in qualitative research is the manual process of scheduling and conducting one-on-one interviews. To scale, you must automate the outreach. Instead of spending weeks finding and talking to 10 users, an **AI-driven conversational agent** can engage with hundreds or even thousands of them in a matter of hours.
Using channels your customers actually use—like a voice call, WhatsApp, or a web chat—an AI agent can initiate a 2-3 minute conversation to investigate your "killer question." This allows you to gather a massive volume of qualitative data without ever having to schedule a single Zoom call.
## Step 3: Let AI Transcribe, Code, and Analyze the Data
The second bottleneck is analysis. Manually listening to, transcribing, and tagging hours of interview recordings is a soul-crushing task that can take days. This is where **AI becomes a Product Manager's superpower**.
As the conversations happen, the platform should do the heavy lifting for you:
- **Instant Transcription**: Every voice conversation is automatically transcribed.
- **Thematic Analysis**: The AI identifies and tags the key topics, themes, and sentiments in every response.
- **Real-time Dashboard**: All the data flows into a dashboard, instantly showing you the most frequent points of friction, feature requests, or user frustrations.
You go from a mountain of raw data to a prioritized list of insights in minutes, not weeks.
## Step 4: Create a Continuous Discovery Loop
The ultimate goal is to stop thinking of user research as a "project" and start treating it as a **continuous system**. By automating the collection and analysis, you create a feedback loop that constantly feeds your product development process.
Now, validating a new feature idea doesn't mean kicking off a month-long research project. It means launching an AI agent with a new "killer question" and getting actionable insights back within 48 hours. This agility allows you to de-risk your roadmap, build with confidence, and systematically create products your customers love.
## Stop Building in the Dark
You no longer have to choose between moving fast and being customer-centric. By leveraging **AI-powered conversations**, you can get the deep user insights you need at the speed your business demands.
Ready to validate your next feature with real user feedback? Request a personalised demo and see how you can get actionable insights in hours, not weeks.`,author:"LexicPulse Team",date:"2024-08-30",category:"Product Development",readTime:"7 min read",featured:!1},{id:7,title:"Beyond Surveys: Why the Real Voice of the Customer is Your Greatest Asset",slug:"beyond-surveys-voice-of-customer-greatest-asset",excerpt:"Exceptional companies don't just sell—they listen through AI-powered customer interviews. Discover how to capture authentic customer feedback at scale with voice-first research technology that delivers actionable insights.",content:"In today's competitive market, what separates exceptional companies? They use AI-powered customer interviews to truly listen. Discover why authentic customer voices captured through conversational AI are your most valuable asset for growth.",fullContent:`In today's competitive market, what separates a good company from an exceptional one? The answer is simpler than you think: exceptional companies don't just sell; they listen. Truly listen through **AI-powered customer interviews** that capture authentic feedback at scale.
But what does it really mean to listen to customers in an era of digital noise and data overload? It means moving beyond cold rating stars or survey checkboxes. It means discovering the real, authentic voice of your customers through **conversational AI for customer research** that enables natural, human-like interactions.
## The Echo of Traditional Surveys: What Are We Missing?
Customer Satisfaction (CSAT) and Net Promoter Score (NPS) surveys have been the standard for years. They're useful, but they only give us a fraction of the story. A 7 out of 10 score doesn't explain the "why." It doesn't capture the tone of hesitation, tentative suggestions, or genuine enthusiasm revealed only in **voice-first customer research**.
By relying solely on traditional methods, companies risk:
- **Getting data without context**: Collecting the "what" but never understanding the "why"
- **Causing customer fatigue**: Users tire of impersonal, repetitive questions
- **Missing golden insights**: The most innovative ideas don't fit on a 1-10 scale
## The Invaluable Worth of Voice of Customer (VoC) with AI
When you commit to active listening through **automated voice interviews**, you transform your business from the inside out. Deep analysis of customer feedback directly impacts your company's most critical areas.
### Drives Innovation and Product Improvement
Your customers are experts on using your product. **AI voice agents for customer feedback** capture exactly which features confuse users, what functionality is missing, and how small tweaks could dramatically improve experience. They're your most honest, cost-effective R&D team.
### Increases Retention and Loyalty
Customers who feel heard through **WhatsApp for customer feedback** and voice interviews stay longer. Acting on their feedback proves you care, building loyalty that money can't buy and turning customers into brand ambassadors.
### Creates Memorable Customer Experiences
Understanding frustrations through **conversational AI customer research** allows you to redesign customer journeys for seamless, enjoyable experiences. Exceptional CX is one of the few sustainable differentiators left—and it starts with listening.
## The Challenge: Scaling Human Connection with AI
Most companies get stuck here. Personal interviews are valuable but consume enormous time and resources. How can you have thousands of meaningful conversations without hiring armies of interviewers?
The answer: **AI-powered customer interviews** that converse naturally, asking the right follow-up questions at the perfect moment.
## LexicPulse: AI Voice Agents That Unlock Customer Truth
At LexicPulse, we've solved this challenge. Our platform doesn't just collect data—it facilitates genuine conversations through **automated voice interviews** that deliver:
- **Authentic feedback capture**: Our **AI voice agents** converse naturally with customers, letting them express themselves freely
- **Actionable insights**: Advanced analysis extracts key themes, sentiments, and suggestions
- **Scale without compromise**: Get personal interview depth with automation efficiency
- **Multi-channel reach**: Deploy through **WhatsApp for customer feedback**, phone calls, and web interfaces
## Transform Your Customer Understanding Today
Moving from guessing to listening through **AI-powered customer interviews** is the most strategic decision you can make. Your customers' voices contain the growth answers you need.
Ready to unlock authentic customer insights with **conversational AI for customer research**?
**Contact us**: info@lexic.ai`,author:"LexicPulse Team",date:"2024-07-13",category:"Customer Research",readTime:"12 min read",featured:!0},{id:1,title:"Global E-commerce Giant Recovers $1.2M in Lost Revenue with AI-Driven Cart Abandonment Interviews",slug:"global-ecommerce-cart-abandonment-case-study",excerpt:"Discover how a major e-commerce platform used AI-powered customer interviews to identify cart abandonment causes, recovering $1.2M through conversational AI insights and targeted optimization strategies.",content:"See how AI voice agents for customer feedback transformed cart abandonment research, delivering actionable insights that recovered millions in lost e-commerce revenue through automated voice interviews.",fullContent:`## Client Profile
**Global E-commerce Platform** serving 1M+ monthly visitors across 15 countries
## Business Challenge
- **73% cart abandonment rate** causing significant revenue hemorrhaging
- Limited insight into customer decision-making at checkout
- Traditional surveys yielding <5% response rates with generic feedback
## LexicPulse Solution
Implementation of **AI-powered customer interviews** for real-time cart abandonment research using **conversational AI for customer research**
## Implementation & Multi-Channel Strategy
The conversion optimization team deployed LexicPulse's **automated voice interviews** targeting customers within 24 hours of cart abandonment. Our **AI voice agents for customer feedback** reached users through:
- **Automated phone calls** with human-like voice synthesis
- **WhatsApp for customer feedback** with conversational message flows
- **SMS campaigns** linking to voice interview experiences
- **Email invitations** with personalized interview requests
- **Live chat integration** on high-intent pages
## Critical Customer Insights Discovered
### High-Ticket Financing Confusion
**AI voice agents** revealed widespread confusion about installment options for purchases >$500. Customers expressed uncertainty about deferred payment terms and security concerns.
*"I wanted to pay in installments but couldn't find clear information about interest rates. The checkout felt risky, so I left."* - Customer via **automated voice interview**
### Mobile Checkout Friction Points
45% of mobile cart abandonments stemmed from checkout complexity. **Conversational AI customer research** identified specific pain points:
*"The mobile checkout kept freezing when I tried Apple Pay. After three attempts, I gave up."* - Mobile user feedback
## Advanced AI Implementation Features
### Multi-Channel Customer Outreach
**Voice-first customer research** system adapting to customer preferences, boosting response rates from 8% to 34% through intelligent channel selection.
### Natural Language Processing Excellence
**AI-powered customer interviews** utilizing advanced NLP for authentic, trust-building conversations that generated honest, detailed responses.
### Real-Time Sentiment Analysis
Automated detection of customer frustration and satisfaction signals, prioritizing critical insights for immediate optimization actions.
### Intelligent CRM Integration
Seamless Shopify connection enabling smart segmentation by cart value, purchase history, and behavioral patterns for targeted **automated voice interviews**.
## Transformational Business Outcomes
- **Cart abandonment reduced** from 73% to 61% in just 8 weeks
- **$1.2M recovered revenue** in the first quarter through targeted optimizations
- **28% increase** in mobile checkout conversion rates
- **40% improvement** in overall checkout satisfaction scores
- **300% increase** in actionable customer feedback volume
## Strategic Impact & Conclusion
The deployment of **AI voice agents for customer feedback** revolutionized the company's customer understanding, enabling data-driven optimizations that delivered immediate revenue impact. **Conversational AI for customer research** proved superior to traditional methods, providing deep insights at scale.
## Ready to Transform Your E-commerce Performance?
Discover how **AI-powered customer interviews** can unlock hidden revenue opportunities in your business.
**Contact LexicPulse**: info@lexic.ai`,author:"LexicPulse Team",date:"2024-03-15",category:"Case Study",readTime:"6 min read",featured:!1},{id:2,title:"Dental Clinic in Málaga Increases Patient Satisfaction by 40% with AI Voice Interviews",slug:"dental-clinic-patient-care-malaga",excerpt:"Discover how a leading Málaga dental clinic used AI-powered customer interviews and WhatsApp for customer feedback to revolutionize patient experience and reduce appointment cancellations.",content:"See how AI voice agents for customer feedback transformed patient communication at a premium Málaga dental clinic, delivering 40% satisfaction improvements through conversational AI insights.",fullContent:`## Client Profile
**Premium Dental Clinic in Málaga** serving 500+ monthly patients with specialized cosmetic and general dentistry services
## Healthcare Challenge
- Declining patient satisfaction scores affecting clinic reputation
- **25% appointment cancellation rate** impacting revenue
- Limited insight into patient concerns and treatment communication gaps
- Reactive approach to patient feedback collection
## LexicPulse Healthcare Solution
Deployment of **AI-powered customer interviews** for systematic patient experience optimization using **conversational AI for customer research**
## Implementation & Patient Engagement Strategy
The clinic integrated LexicPulse's **automated voice interviews** for comprehensive patient follow-up 24-48 hours post-appointment. Our **AI voice agents for customer feedback** engaged patients through:
- **Spanish-language phone interviews** with empathetic, natural voice synthesis
- **WhatsApp for customer feedback** with conversational patient care flows
- **Email follow-up campaigns** for patients preferring written communication
- **Seamless integration** with clinic management systems for smart patient segmentation
## Critical Patient Experience Insights
### Treatment Communication Gaps
**AI-powered customer interviews** revealed systematic communication issues around treatment plans and cost transparency.
*"The dentist was professional, but I left confused about how many sessions I'd need and the total cost. Better explanation would help."* - Patient via **automated voice interview**
### Appointment Scheduling Friction
35% of patients reported longer-than-expected waiting times, particularly during morning hours, identified through **voice-first customer research**.
### Post-Treatment Care Confusion
**Conversational AI customer research** uncovered patient uncertainty about pain management and aftercare protocols.
## Outstanding Healthcare Outcomes
- **40% increase** in overall patient satisfaction scores
- **25% reduction** in follow-up appointment cancellations
- **50% improvement** in treatment communication clarity ratings
- **30% increase** in new patient referrals from existing patients
- **200% boost** in actionable patient feedback volume
## Revolutionize Your Healthcare Practice
Ready to transform patient experience with **AI voice agents for customer feedback**?
**Contact LexicPulse**: info@lexic.ai`,author:"LexicPulse Team",date:"2024-03-10",category:"Case Study",readTime:"5 min read",featured:!1},{id:3,title:"Boutique Hotel Improves NPS Score by 45 Points with AI-Powered Guest Interviews",slug:"boutique-hotel-guest-satisfaction",excerpt:"Discover how a luxury boutique hotel used AI voice agents for customer feedback and WhatsApp for customer feedback to transform guest experience, achieving a 45-point NPS improvement through real-time conversational AI insights.",content:"See how AI-powered customer interviews revolutionized hospitality guest feedback, delivering dramatic NPS improvements through real-time voice-first customer research and automated guest engagement.",fullContent:`## Client Profile
**Luxury Boutique Hotel** featuring 50 premium rooms serving international clientele with high service expectations
## Hospitality Challenge
- **Critically low NPS score of 15** damaging reputation and bookings
- **Limited guest feedback** during stays preventing proactive service recovery
- **58% guest response rate gap** with traditional feedback methods
- Reactive approach to guest experience management
## LexicPulse Hospitality Solution
Implementation of **AI-powered customer interviews** for real-time guest experience optimization using **conversational AI for customer research**
## Implementation & Guest Journey Integration
The hotel deployed LexicPulse's **automated voice interviews** across multiple guest touchpoints for comprehensive feedback capture. Our **AI voice agents for customer feedback** engaged guests through:
- **Post check-in automated calls** (24-hour intelligent timing)
- **WhatsApp for customer feedback** integrated with reception for instant insights
- **In-room QR codes** linking to **conversational AI customer research** experiences
- **Pre check-out phone interviews** for comprehensive stay evaluation
- **Multi-language voice support** for international guest accessibility
## Critical Guest Experience Insights
### Check-in Process Inefficiencies
**AI-powered customer interviews** revealed systematic delays affecting guest first impressions, particularly for international arrivals.
*"Check-in took 20 minutes after a long flight. At a hotel of this caliber, I expected something much smoother and more welcoming."* - International guest via **automated voice interview**
### Concierge Service Gaps
**Voice-first customer research** identified lack of proactive local recommendations and multi-language information availability issues.
### Dining Experience Limitations
40% of guests mentioned restrictive dietary accommodation and inflexible restaurant scheduling through **conversational AI feedback**.
## Exceptional Hospitality Outcomes
- **NPS improvement from 15 to 60 points** in just 6 months
- **35% increase** in overall guest satisfaction scores
- **50% reduction** in formal post-stay complaints
- **25% increase** in repeat booking rates
- **400% improvement** in actionable guest feedback volume
## Elevate Your Hotel's Guest Experience
Ready to transform hospitality service with **conversational AI for customer research**?
**Contact LexicPulse**: info@lexic.ai`,author:"LexicPulse Team",date:"2024-03-05",category:"Case Study",readTime:"5 min read",featured:!1},{id:4,title:"Gaming Startup Increases User Retention by 60% with AI-Powered Player Research",slug:"gaming-startup-user-research",excerpt:"Discover how a gaming startup used AI voice agents for customer feedback and adaptive conversational AI research to understand player motivations, achieving 60% retention improvements through voice-first gaming insights.",content:"See how AI-powered customer interviews transformed gaming user research, delivering dramatic retention improvements through real-time player feedback and automated voice interviews tailored to gaming behavior.",fullContent:`## Client Profile
**Gaming Startup** serving 100K+ monthly active users with innovative mobile gaming experiences
## Gaming Industry Challenge
- **Devastating 75% user churn** within first 7 days of gameplay
- **Limited understanding** of player motivations and engagement drivers
- **Traditional analytics** missing emotional context behind player decisions
- **Reactive approach** to user experience optimization
## LexicPulse Gaming Solution
Implementation of adaptive **AI-powered customer interviews** for deep player research using **conversational AI for customer research** tailored to gaming contexts
## Implementation & Player Journey Integration
The startup deployed LexicPulse's **automated voice interviews** across critical player touchpoints. Our **AI voice agents for customer feedback** engaged players through:
- **Post-registration interviews** for new player onboarding optimization
- **Churn prediction outreach** with **automated voice interviews** targeting at-risk players
- **WhatsApp for customer feedback** on new feature releases and updates
- **In-game interview integration** for real-time experience feedback
## Critical Player Experience Insights
### Overwhelming Learning Curve
*"The game looked incredible, but I had no idea where to start. After 10 frustrating minutes with zero progress, I deleted it."* - New player
### Progression System Confusion
*"I played for hours but didn't understand how to get better weapons or what actions actually mattered for progression."* - Player feedback
### Social Feature Demand
65% of players expressed desire for enhanced social connectivity and competitive features.
## Transformational Gaming Outcomes
- **7-day retention skyrocketed** from 25% to 85%
- **60% improvement** in tutorial completion rates
- **40% increase** in social feature engagement
- **50% reduction** in time to first in-app purchase
**Contact LexicPulse**: info@lexic.ai`,author:"LexicPulse Team",date:"2024-02-28",category:"Case Study",readTime:"6 min read",featured:!1},{id:5,title:"Diagnostic Imaging Chain Improves Patient Experience by 50% with AI Voice Technology",slug:"diagnostic-imaging-chain-patient-experience",excerpt:"Discover how a leading diagnostic imaging chain used AI-powered customer interviews and WhatsApp for customer feedback to reduce patient anxiety and optimize medical operations through conversational AI insights.",content:"See how AI voice agents for customer feedback transformed medical patient experience at a 15-center diagnostic chain, delivering 50% satisfaction improvements through automated voice interviews and healthcare-focused conversational AI.",fullContent:`## Client Profile
**Diagnostic Imaging Clinic Chain** operating 15 specialized centers serving 2000+ monthly patients
## Healthcare Challenge
- **High patient anxiety** during complex diagnostic procedures
- **Limited systematic feedback** about patient experience and service quality
- **Communication gaps** between medical staff and patients
## Implementation & Patient Care Integration
- Pre-appointment calls for preparation and expectations
- Post-procedure WhatsApp for immediate feedback
- Phone interviews 48h later for complete evaluation
- Follow-up for patients with complex procedures (PET-CT, MRI)
## Key Frustrations Identified
*"Nobody explained that the MRI noise would be so loud. I would have liked to be better prepared"* - Interviewed patient
45% of patients mentioned confusion about result wait times and lack of proactive communication.
## Outcomes
- 50% improvement in patient satisfaction scores
- 30% reduction in reported anxiety levels
- 40% increase in adequate procedure preparation
- 35% improvement in medical communication perception
**Contact LexicPulse**: info@lexic.ai`,author:"LexicPulse Team",date:"2024-02-20",category:"Case Study",readTime:"5 min read",featured:!1},{id:6,title:"Boost Your Training: How Conversational AI Transforms Course Evaluation and Student Experience",slug:"boost-training-conversational-ai-course-evaluation",excerpt:"Discover how conversational AI is revolutionizing the way training companies gather student feedback and optimize their educational programs.",content:"In the dynamic world of training and professional development, the ability to adapt and offer programs that truly meet student needs is key to success...",fullContent:`In the dynamic world of training and professional development, the ability to adapt and offer programs that truly meet student needs is key to success. But how do you know if your content resonates? How do you identify the knowledge gaps your courses should fill? And how do you ensure the learning experience is optimal from start to finish?
The traditional answer has often been satisfaction surveys. But let's be honest, these tools often provide a superficial and delayed view. We need to go beyond.
**The Challenge of Feedback in Traditional Training**
Training companies, L&D teams, and course creators face a common challenge: obtaining deep, honest, and actionable feedback from their students.
End-of-course surveys often suffer from:
- **Low response rates:** Students are busy and don't always take time to fill out long forms.
- **Generic responses:** Closed questions limit detail richness and don't capture the "why" behind a rating.
- **Lack of context:** Feedback is often collected long after the experience, losing immediacy.
- **Analysis difficulty:** Extracting valuable insights from hundreds or thousands of open responses is a manual and exhausting task.
**The Solution: Intelligent Conversations for Impactful Training**
This is where conversational artificial intelligence, like that offered by LexicPulse, changes the game for the education and training sector. Imagine being able to have meaningful dialogues with your students at scale, where they feel truly heard and you get the information you need to drive excellence.
LexicPulse allows you to:
- **Validate Course Ideas:** Before investing in a new program, launch conversations with your target audience to understand what skills they want, what problems they need to solve, and what formats they prefer.
- **Optimize Learning Content:** Identify which modules are most engaging, where students find difficulties, or what topics need to be deepened.
- **Measure Program Effectiveness:** Beyond satisfaction, understand the real impact of your training.
- **Personalize the Student Experience:** By understanding individual needs and learning preferences, you can adapt your programs.
**Want to know more? Email us: info@lexic.ai**`,author:"LexicPulse Team",date:"2024-06-20",category:"Education",readTime:"8 min read",featured:!1},{id:8,title:"How Voice-Based Feedback is Transforming Product Development",slug:"voice-based-feedback-transforming-product-development",excerpt:"Traditional feedback methods are losing effectiveness. Discover how voice-based feedback with conversational AI is revolutionizing product development by capturing authentic user insights at scale.",content:"Voice-based feedback is transforming how product teams collect and analyze user insights. Unlike static surveys, voice captures tone, sentiment, and intent—critical elements for making data-driven product decisions.",fullContent:`## Why Voice Feedback Matters in Today's Product Development Cycle
Traditional feedback collection methods—static forms, NPS surveys, and email questionnaires—are losing effectiveness. Customers demand more natural, frictionless interactions. Voice-based feedback addresses this by providing an authentic, real-time understanding of user experiences.
Unlike text-based surveys, voice captures tone, sentiment, and intent—critical elements for making data-driven product decisions.
According to recent studies, businesses leveraging voice interactions see **40% higher engagement rates** compared to traditional forms.
## The Power of Conversational AI in Voice Feedback
Collecting voice feedback at scale is now possible thanks to conversational AI. Platforms like **Lexic Pulse** allow businesses to:
- **Engage users via phone calls or embedded web widgets** for real-time feedback
- **Analyze sentiment and emotions beyond text**, identifying what users truly feel about a feature or experience
- **Adapt conversations dynamically**, asking follow-up questions based on user responses
## Use Cases for Voice Feedback in Product Development
### Feature Validation
Collect authentic voice insights before launching a feature to gauge user sentiment.
### Beta Testing Feedback
Automate phone-based interviews at scale with AI-driven analysis.
### Post-Launch Experience
Understand real-world customer reactions and identify UX issues quickly.
## Why Lexic Pulse Leads in Voice Feedback
Unlike other solutions limited to chat or forms, **Lexic Pulse** combines voice, WhatsApp, and embedded widgets for multi-channel adaptive feedback. Its AI-driven analysis converts conversations into actionable insights—faster and with more depth than any static survey can deliver.
Ready to replace static forms with real conversations? [Discover how Lexic Pulse works](https://app.lexic.ai).`,author:"LexicPulse Team",date:"2024-08-30",category:"Product Development",readTime:"6 min read",featured:!1},{id:11,title:"The Empathy Gap: Why Dashboards Alone Won't Help You Understand Your Customers",slug:"empathy-gap-dashboards-customer-understanding",excerpt:"Discover why traditional metrics create a dangerous illusion of understanding and how conversational AI can bridge the gap between data and real empathy.",content:"Companies are drowning in dashboards but starving for real insights. Learn how to move from cold metrics to conversations that reveal true customer sentiment.",fullContent:`# The Empathy Gap: Why Dashboards Alone Won't Help You Understand Your Customers
Every Monday morning, thousands of CX leaders open their dashboards to the same ritual: check the NPS, track the CSAT, compare week-over-week performance. A dip of three points, a red arrow, a sudden decline. The numbers are there, precise and clinical.
But then comes the silence. The most important question remains unanswered: **Why did this happen?**
This is what we call **the empathy gap**—a blind spot created when organizations obsess over measuring customer sentiment but stop short of truly understanding it.
## Data Everywhere, Wisdom Nowhere
In our work with CX, Product, and Marketing teams, one truth stands out: **companies are drowning in dashboards but starving for insight**.
Metrics, as useful as they are, often create a dangerous illusion of understanding. They tell us what happened but rarely reveal why. That disconnect fuels misaligned strategies, blind spots in the customer journey, and missed opportunities to build loyalty.
## Why Traditional Feedback Falls Short
**Survey fatigue is real.** Long, boring forms generate low response rates. You mostly hear from the happiest or the angriest, leaving the silent majority unheard.
**Metrics without context mislead.** NPS tells you the past, not the future. It's a lagging indicator, not a diagnostic tool.
**Qualitative analysis doesn't scale.** Even when customers leave comments, manually reading and coding them is slow, expensive, and biased. By the time insights arrive, the moment to act has already passed.
## From Dashboards to Conversations
Closing the empathy gap requires a shift in mindset: **from collecting data about customers to having conversations with them**.
Imagine being able to chat with every customer for two minutes, right after a key moment—checkout, support call, product trial. Not a rigid survey, but a natural, adaptive dialogue on channels they already use, like WhatsApp or a quick voice call.
This is where **conversational AI changes the game**.
## Empathy at Scale
**Speed becomes an advantage.** Analysis that once took days happens in minutes. Teams move from reporting to acting.
**Silos break down.** Real customer voices become accessible across CX, Product, and Marketing, aligning everyone around a shared truth.
**Proactivity replaces reactivity.** Instead of waiting for KPIs to drop, emerging issues can be spotted in near real time.
## Understanding Is the New Advantage
The companies that thrive in the next decade won't be those with the prettiest dashboards. They'll be the ones that close the empathy gap.
Because in today's economy, **empathy is not a soft skill. It's the most powerful growth engine you have**.
*Ready to close the empathy gap in your organization? Discover how conversational AI can transform your customer understanding.*`,author:"Lexic Team",date:"2025-09-15",category:"Customer Research",readTime:"8 min read",featured:!1},{id:17,title:'Bankinter & The "Corporate Brain": Managing 3,000+ Daily Inquiries with 75% Less OPEX through Total Customer Intelligence',slug:"bankinter-corporate-brain-case-study",excerpt:"Most banks are deaf to 99% of their customer interactions. Bankinter decided to listen to everything—and then built an AI that could actually solve the problems it heard. Here's how Lexic's Double Hélice architecture delivered 80% autonomous resolution and 75% OPEX savings.",content:"How Lexic deployed a Conversational Intelligence Core across 550 Bankinter offices, turning 3,000 daily inquiries into a strategic data asset with 80% autonomous resolution.",fullContent:`"Most banks are deaf to 99% of their customer interactions. Bankinter decided to listen to everything—and then built an AI that could actually solve the problems it heard."
## The Architecture of the Problem: The Knowledge Leak
Bankinter faced a critical operational collapse. Across 550 offices, they were handling over 3,000 daily inquiries with a support structure that couldn't keep up.
### The Invisible Friction
A **25% quarterly staff turnover** meant that business knowledge was constantly "leaking" out. New agents required endless, costly training cycles, yet service quality continued to degrade.
### The Operational Blindness
Management was making decisions based on the **"1% Myth"**—auditing only a tiny fraction of calls manually. The remaining 98–99% of customer interactions remained a "Black Box."
### The Goal
Scale support architecture without increasing headcount or compromising resolution quality.
---
## The Lexic Solution: The Double Hélice (Passive + Active)
We deployed a **Conversational Intelligence Core** that acted as a living "Corporate Brain," integrating both sides of the Lexic Pulse engine:
1. **Passive Listening** (Building the Ground Truth)
2. **Active Orchestration** (Custom Care Agents)
### 1. Passive Listening: Building the Ground Truth
Before automating, we had to understand. We audited **100% of the omnichannel interactions** Bankinter already had.
- **Semantic Mapping:** We identified every recurring objection, friction point, and query type across thousands of hours of audio and text.
- **Knowledge Structuring:** This data was transformed into a Semantic Knowledge Base, capturing the collective intelligence of the bank's best performers and formalizing it into a "Source of Truth."
### 2. Active Orchestration: Custom Care Agents
Leveraging that Knowledge Base, we deployed **Multi-Modal AI Agents** (Voice and Chat) to handle the front line:
- **Autonomous Resolution:** These aren't simple chatbots. They are agents capable of navigating complex business logic to resolve queries end-to-end.
- **100% Overflow Coverage:** Lexic agents now handle all telephone and chat peaks, eliminating wait times and human friction entirely.
---
## Deterministic Outcomes: Efficiency at Scale
By shifting from reactive manual auditing to proactive AI intelligence, the ROI was immediate and measurable:
- **80% Autonomous Resolution:** 2,400 daily inquiries are now resolved without any human intervention.
- **75% OPEX Savings:** We eradicated the need for an oversized, outsourced call center to manage volume spikes.
- **Zero Training Latency:** High-fidelity knowledge is now instantly accessible. The "Corporate Brain" never forgets and doesn't need a 4-week onboarding process.
- **From 1% to 100% Visibility:** Management now has real-time insights into every single customer interaction, turning support from a cost center into a strategic data asset.
---
## The Challenger Insight
"Bankinter didn't just solve a volume problem; they solved a **blindness problem**." By auditing the 100% (Passive) to build the intelligence, and then deploying that intelligence via Custom Agents (Active), they moved from guessing what their customers needed to **knowing and solving it in real-time**.`,author:"Lexic Team",date:"2025-01-15",category:"Case Study",readTime:"8 min read",featured:!1},{id:18,title:"TotalEnergies & The Death of Administrative Friction: Reducing Document Processing Time by 95% to Accelerate Carbon Revenue",slug:"totalenergies-administrative-friction-case-study",excerpt:"In the race for energy efficiency, the biggest bottleneck isn't the technology in the field—it's the paperwork in the office. TotalEnergies (Greenflex) used Lexic to turn a manual 20% error rate into a 95% velocity gain.",content:"How Lexic deployed an Autonomous Document Agent for Greenflex (TotalEnergies), eliminating a 20% rejection rate on 350 daily documents and cutting processing time by 95% to accelerate carbon revenue collection.",fullContent:`"In the race for energy efficiency, the biggest bottleneck isn't the technology in the field—it's the paperwork in the office. TotalEnergies (Greenflex) used Lexic to turn a manual 20% error rate into a 95% velocity gain."
## The Architecture of the Problem: The Administrative Chokehold
For Greenflex (TotalEnergies), managing energy efficiency projects meant managing a mountain of complexity. Processing **350 complex documents daily** had become a massive operational drag.
### The Invisible Friction
**20% of project files** were being rejected due to minor formatting or data errors. This wasn't just an admin headache; it was a financial one.
### The Revenue Drag
Every rejected document delayed the collection of **carbon compensation revenue**. High staff turnover in admin roles meant constant retraining and a "Black Box" of process errors.
### The Goal
Eliminate manual verification and move from "Document Auditing" to "Autonomous Resolution."
---
## The Lexic Solution: The Autonomous Document Agent
We deployed a specialized version of the Lexic "Corporate Brain" designed for **Administrative Velocity**. Instead of just "reading" text, the AI was trained to understand and validate business logic.
1. **Passive Intelligence** (The Process Audit)
2. **Active Orchestration** (The Document Agent)
### 1. Passive Intelligence: The Process Audit
We analyzed **100% of rejected files** to identify the semantic patterns of failure.
We mapped every friction point—from land registry mismatches to ID errors—creating a structured "Source of Truth" for what a perfect document looks like.
### 2. Active Orchestration: The Document Agent
Using that intelligence, we deployed an **Autonomous Management Agent** that replaced manual review with real-time AI logic:
- **Intelligent Extraction:** Automated capture of critical data points from hundreds of diverse formats.
- **Real-Time Cross-Referencing:** The agent performs an Automated Audit, matching IDs and land registry records against national databases in seconds.
- **CRM Integration:** To avoid "Dashboard Fatigue," the agent pushes validated data directly into existing systems.
---
## Deterministic Outcomes: Efficiency as a Competitive Edge
By automating the "Brainwork" of document verification, the ROI for TotalEnergies was immediate:
- **95% Time Savings:** What took hours now takes seconds. Administrative processing has moved from a bottleneck to a high-speed pipeline.
- **70% Resource Optimisation:** Teams were liberated from routine data entry and pivoted to high-value strategic verification and project management.
- **Accelerated Revenue:** Faster approval cycles directly reduced the "Lag Time" for carbon credit collection, improving cash flow.
- **Zero Training Latency:** The AI doesn't forget rules or suffer from turnover. The process remains 100% consistent 24/7.
---
## The Challenger Insight
"TotalEnergies realised that administrative error is just a **lack of intelligence at scale**." By using Lexic Pulse to audit the friction (Passive) and resolve it through Autonomous Agents (Active), they didn't just save time—they **unlocked the speed of their business**.`,author:"Lexic Team",date:"2026-01-15",category:"Case Study",readTime:"7 min read",featured:!1},{id:101,title:"Why NPS is a Lagging Indicator: Identifying Friction in the 99% of Unanalyzed Interaction Data",slug:"nps-lagging-indicator-churn",excerpt:"Net Promoter Score (NPS) is a lagging indicator because it relies on retrospective feedback from a small sample of self-selected respondents. To identify real-time friction, B2B leaders must shift to Total Customer Intelligence.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"8 min read",featured:!1},{id:102,title:"Beyond the 1% Audit: How AI Automates 100% of Call Center Quality Assurance",slug:"automated-call-center-qa-framework",excerpt:"Automating call center Quality Assurance (QA) requires replacing manual 1% sampling with AI-driven omnichannel auditing. Lexic Pulse enables this through a passive engine that monitors 100% of service interactions in real-time.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"10 min read",featured:!1},{id:103,title:"Market Validation at AI Speed: Replacing Slow Focus Groups with WhatsApp AI Agents",slug:"ai-moderated-market-research-speed",excerpt:"Validating a new SaaS feature or market hypothesis no longer requires weeks of traditional focus groups. AI-moderated interviews via WhatsApp allow brands to reach global panels of millions and get deep qualitative validation in under 48 hours.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"8 min read",featured:!1},{id:104,title:"The Anatomy of a 'Gone Dark' Deal: Uncovering Hidden Pipeline Leaks with Passive Audits",slug:"automatic-deal-loss-attribution-ai",excerpt:'Deals "go dark" when sales teams miss subtle friction signals during the discovery phase. Passive interaction auditing uses AI to automatically analyze sales calls and emails, mapping deal-loss patterns that traditional CRM fields never capture.',content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"8 min read",featured:!1},{id:105,title:"AI-Moderated Qualitative Interviews: The End of Slow Market Research",slug:"ai-moderated-qualitative-interviews",excerpt:"AI-Moderated Interviews are an advanced qualitative research method using autonomous AI agents for adaptive two-way conversations with global panels, achieving 80% response rates on WhatsApp and delivering results in under 48 hours.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"10 min read",featured:!1},{id:106,title:"The Logic of Adaptive Probing: How Lexic Pulse Agents Dig Deeper Than 'Yes/No' Answers",slug:"logic-adaptive-probing-ai-interviews",excerpt:"Adaptive probing transforms rigid surveys into fluid AI interviews by using real-time NLP to formulate contextual follow-up questions that extract root emotional and operational causes of customer behavior.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"7 min read",featured:!1},{id:107,title:"AI Interviews vs. Traditional NPS: Why 80% Response Rates are the New Standard",slug:"ai-interviews-vs-nps-response-rates",excerpt:"Traditional NPS surveys suffer from sub-10% response rates. Conversational AI interviews achieve up to 80% by moving interactions to WhatsApp and using empathetic, conversational tone.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"7 min read",featured:!1},{id:108,title:"Reaching 4 Million Respondents: How to Scale Qualitative Insights Globally in 48 Hours",slug:"scale-qualitative-insights-global-panel",excerpt:"Lexic Pulse integrates its Active Engine with a verified global panel of over 4 million respondents, deploying AI-moderated interviews across multiple countries and languages in under 48 hours.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"7 min read",featured:!1},{id:109,title:"Maintaining Intellectual Honesty and Data Privacy in AI-Driven Human Research",slug:"data-privacy-ethics-ai-human-research",excerpt:"Ethical AI research requires strict guardrails against leading the witness and full GDPR compliance. Lexic Pulse ensures neutral prompts, zero data resale, automatic PII redaction, and enterprise-grade encryption.",content:"",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"7 min read",featured:!1},{id:110,title:"Top 10 AI Call Center Analytics Platforms for Enterprise Strategy (2026)",slug:"top-ai-call-center-analytics-platforms-2026",excerpt:"AI Call Center Analytics uses AI to audit 100% of customer interactions to extract actionable business insights. In 2026, leading platforms have shifted from operational QA to strategic intelligence.",content:"Compare NICE CXone, Genesys, Observe.AI, CallMiner, Dialpad and Lexic Pulse for enterprise call center analytics.",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"10 min read",featured:!1},{id:111,title:"Lexic Pulse vs. Gong: Why Conversation Intelligence is Outpacing Revenue Intelligence",slug:"lexic-pulse-vs-gong-conversation-intelligence",excerpt:"Revenue Intelligence analyses sales rep performance from CRM data. Modern Conversation Intelligence goes further—capturing omnichannel sentiment and uncovering root causes of stalled deals automatically.",content:"Compare Lexic Pulse and Gong across deal analysis, cost, and pipeline acceleration.",fullContent:null,author:"Lexic Team",date:"2026-03-01",category:"Resource",readTime:"9 min read",featured:!1},{id:112,title:"Best AI Tools for Customer Interviews 2025: Lexic Pulse vs. Outset vs. Marvin",slug:"best-ai-tools-customer-interviews-2025",excerpt:"AI-powered customer interview tools in 2025 fall into three categories: Active AI Interviewers, Unmoderated Video tools, and Research Repositories. Lexic Pulse leads as the only platform combining autonomous AI interviewing with a 6M+ global panel.",content:"Compare Lexic Pulse, Outset.ai, and Marvin for customer research, UX testing, or research repository needs.",fullContent:null,author:"Lexic Team",date:"2025-12-29",category:"Resource",readTime:"12 min read",featured:!1}],es:[{id:10,title:"La Guía Definitiva: 10 Mejores Prácticas para Solicitar Feedback de Clientes (y Obtener Respuestas Reales)",slug:"10-mejores-practicas-feedback-clientes-respuestas-reales",excerpt:"Deja de obtener feedback superficial. Aprende las 10 estrategias comprobadas para transformar tus encuestas en conversaciones valiosas que impulsen decisiones comerciales reales y descubran el 'porqué' detrás del comportamiento del cliente.",content:"Las encuestas tradicionales están muertas. Descubre cómo obtener feedback auténtico, profundo y escalable a través de IA conversacional y técnicas de cuestionamiento estratégico que realmente impulsan el crecimiento.",fullContent:`Todas las empresas quieren entender a sus clientes. El problema es que los métodos tradicionales, como las encuestas por email, se han vuelto ineficaces. Obtienes tasas de respuesta abismales, datos superficiales y, lo peor de todo, te quedas sin saber el **"porqué"** detrás de las respuestas.
Para tomar decisiones comerciales inteligentes, necesitas feedback auténtico, profundo y escalable. Esta guía te enseñará las **10 mejores prácticas** para transformar tu proceso de escucha y comenzar a obtener los insights que realmente impulsan el crecimiento.
## 1. ¿Qué Exactamente Quieres Saber? Define un Objetivo Claro
Antes de preguntar cualquier cosa, pregúntate: **¿Qué decisión comercial quiero tomar con esta información?** Un objetivo vago como "saber qué piensan los clientes" te dará respuestas vagas.
## 2. Elige el Momento Perfecto para la Conversación
**Cuándo preguntas es tan importante como qué preguntas.** No pidas feedback sobre el proceso de compra dos semanas después de que ocurrió.
## 3. Ve Donde Están Tus Clientes: Usa Su Canal Preferido
¿Por qué obligar a un cliente a salir de WhatsApp para responder un email si ahí es donde pasa su día?
## 4. Respeta Su Tiempo: Manténlo Corto y Conversacional
**La fatiga de encuestas es real.** Una **conversación de 2-3 minutos**, con un tono amigable y humano, se percibe como una charla útil, no como una tarea.
## 5. Prioriza Preguntas Abiertas para Descubrir el "Porqué"
En lugar de preguntar **"¿Estás satisfecho con nuestro servicio?"**, prueba **"¿Qué fue lo más sorprendente, para bien o para mal, de tu experiencia con nosotros hoy?"**.
## 6. Ve Más Allá de las Métricas: Busca Conversaciones, No Solo Puntuaciones
Una **IA conversacional** puede preguntar dinámicamente: **"Veo que nos diste un 7. ¿Qué podríamos haber hecho para que tu experiencia fuera un 10?"**.
## 7. Personaliza la Experiencia para Hacerlos Sentir Escuchados
**Usa la información que ya tienes** para personalizar la interacción.
## 8. Automatiza la Escucha, No la Empatía
**La automatización es clave para escuchar a escala**, pero no debería sonar robótica.
## 9. Escala tu Investigación Cualitativa Sin Disparar los Costos
Puedes usar herramientas como **Lexic Pulse** para realizar **entrevistas de usuario a escala**.
## 10. Cierra el Ciclo: Comunica y Actúa Sobre el Feedback
**Recopilar feedback y no hacer nada con él es peor que no preguntar en absoluto.**
**[Solicita Tu Demo Personalizada](https://tgz2d.share.hsforms.com/2JjmoziJhSg6R4amGIkaVbw)**`,author:"Equipo Lexic",date:"2025-01-05",category:"Investigación de Clientes",readTime:"18 min de lectura",featured:!0},{id:9,title:"¿Está Tu Hoja de Ruta Basada en Suposiciones? Cómo Obtener Insights Reales de Usuario en 48 Horas",slug:"hoja-ruta-suposiciones-insights-usuarios-48-horas",excerpt:"Todo Product Manager vive con una tensión fundamental: la presión de lanzar características más rápido versus la necesidad de estar seguro de que construyes lo que los usuarios realmente quieren. Descubre un marco de cuatro pasos para pasar de la intuición al insight.",content:"Deja de construir a ciegas. Aprende cómo las conversaciones impulsadas por IA pueden darte insights profundos de usuario a la velocidad que demandan tus sprints de desarrollo.",fullContent:`Todo Product Manager vive con una tensión fundamental: la presión de lanzar características más rápido versus la necesidad de estar seguro de que construyes lo que los usuarios realmente quieren.
## Paso 1: Enmarca Tu "Pregunta Clave"
Identifica la única incógnita más crítica que está bloqueando una decisión.
## Paso 2: Automatiza Tus Entrevistas de Usuario con IA
Un **agente conversacional impulsado por IA** puede interactuar con cientos o incluso miles de usuarios en cuestión de horas.
## Paso 3: Deja que la IA Transcriba, Codifique y Analice los Datos
- **Transcripción Instantánea**: Cada conversación de voz se transcribe automáticamente.
- **Análisis Temático**: La IA identifica y etiqueta los temas clave.
- **Dashboard en Tiempo Real**: Todos los datos fluyen hacia un dashboard.
## Paso 4: Crea un Loop de Descubrimiento Continuo
Validar una nueva idea de característica significa lanzar un agente de IA con una nueva "pregunta clave" y obtener insights accionables de vuelta dentro de 48 horas.
## Deja de Construir en la Oscuridad
¿Listo para validar tu próxima característica con feedback real de usuarios? Solicita una demo personalizada.`,author:"Equipo LexicPulse",date:"2024-08-30",category:"Desarrollo de Producto",readTime:"7 min de lectura",featured:!1},{id:7,title:"Más Allá de las Encuestas: Por Qué la Verdadera Voz del Cliente Es Tu Mayor Activo",slug:"mas-alla-encuestas-voz-cliente-mayor-activo",excerpt:"En el competitivo mercado actual, las empresas excepcionales no solo venden, sino que escuchan. Descubre por qué la voz real y auténtica de tus clientes es tu activo más valioso y cómo capturarla a escala sin perder la humanidad.",content:"En el competitivo mercado actual, ¿qué diferencia a una empresa buena de una excepcional? La respuesta es más simple de lo que crees: las empresas excepcionales no solo venden, sino que escuchan. Escuchan de verdad.",fullContent:`En el competitivo mercado actual, ¿qué diferencia a una empresa buena de una excepcional? La respuesta es más simple de lo que crees: las empresas excepcionales no solo venden, sino que escuchan.
## El Eco de las Encuestas Tradicionales: ¿Qué Nos Estamos Perdiendo?
Una puntuación de 7 sobre 10 no explica el "porqué". No captura el tono de duda, la sugerencia vacilante o el entusiasmo genuino.
## El Valor Incalculable de la Voz del Cliente (VoC)
### Impulsa la Innovación y la Mejora de Producto
Tus clientes son los mayores expertos en el uso de tu producto.
### Aumenta la Retención y la Lealtad
Un cliente que se siente escuchado es un cliente que se queda.
### Crea Experiencias de Cliente (CX) Memorables
Comprender las frustraciones y los puntos de fricción te permite rediseñar los "customer journeys".
## Lexic Pulse: Descubre la Voz Real de Tus Clientes
Capturar feedback auténtico: Nuestros agentes de IA conversan con tus clientes, permitiéndoles expresarse libremente con sus propias palabras.
¿Quieres comenzar a escuchar la voz real de tus clientes? Contáctanos en: info@lexic.ai`,author:"LexicPulse Team",date:"2024-07-13",category:"Investigación de Clientes",readTime:"12 min lectura",featured:!0},{id:1,title:"Cliente global de E-commerce recupera cientos de miles de $ gracias a las entrevistas de IA por Abandono de Carrito",slug:"caso-estudio-abandono-carrito-ecommerce-global",excerpt:"Descubre cómo un gigante del e-commerce utilizó entrevistas automatizadas con IA para identificar y resolver las causas del abandono de carrito, recuperando cientos de miles de dólares en ingresos perdidos.",content:"Una empresa global de e-commerce implementó entrevistas con IA para entender por qué los clientes abandonaban sus carritos de compra...",fullContent:`**Cliente:** E-commerce Global con más de 1M de visitantes mensuales
**Desafío:** Tasa de abandono de carrito del 73% con pérdidas significativas de ingresos
**Solución:** Implementación de entrevistas automatizadas con IA para identificar puntos de fricción específicos
**Frustraciones Clave Identificadas**
*"No sabía si podía pagar en cuotas sin intereses. La información no estaba clara y no quería arriesgarme"* - Cliente entrevistado
*"El proceso en el móvil era muy lento y se colgaba cuando intentaba pagar con Apple Pay"* - Cliente entrevistado
**Resultados**
- Reducción del abandono de carrito del 73% al 61% en 8 semanas
- **Cientos de miles de dólares de ingresos recuperados** en el primer trimestre
- Aumento del 28% en la conversión de checkout móvil
- Mejora del 40% en la satisfacción del proceso de compra
¿Quieres saber más? Envíanos un email: info@lexic.ai`,author:"Equipo LexicPulse",date:"2024-03-15",category:"Caso de Estudio",readTime:"6 min de lectura",featured:!1},{id:2,title:"Clínica Dental en Málaga Aumenta Satisfacción del Paciente en un 40% con Entrevistas de IA",slug:"clinica-dental-atencion-paciente-malaga",excerpt:"Descubre cómo una clínica dental líder en Málaga utilizó entrevistas automatizadas con IA para mejorar la experiencia del paciente y optimizar sus servicios.",content:"Una clínica dental en Málaga implementó un sistema de entrevistas con IA para recopilar feedback detallado de pacientes...",fullContent:`**Cliente:** Clínica Dental Premium en Málaga con 500+ pacientes mensuales
**Desafío:** Necesidad de mejorar la experiencia del paciente y reducir las cancelaciones de citas
**Frustraciones Clave Identificadas**
*"El dentista fue muy profesional, pero me fui sin entender completamente cuántas sesiones necesitaría"* - Paciente entrevistado
**Resultados**
- Aumento del 40% en la satisfacción general del paciente
- Reducción del 25% en cancelaciones de citas de seguimiento
- Mejora del 50% en la claridad de comunicación sobre tratamientos
- Aumento del 30% en referencias de nuevos pacientes
¿Quieres saber más? Envíanos un email: info@lexic.ai`,author:"Equipo LexicPulse",date:"2024-03-10",category:"Caso de Estudio",readTime:"5 min de lectura",featured:!1},{id:3,title:"Hotel Boutique Mejora Puntuación NPS en 45 Puntos con Feedback de IA en Tiempo Real",slug:"hotel-boutique-satisfaccion-huesped",excerpt:"Un hotel boutique de lujo implementó entrevistas con IA para capturar feedback de huéspedes en tiempo real, transformando su experiencia de servicio.",content:"Un hotel boutique implementó un sistema innovador de entrevistas con IA para recopilar feedback de huéspedes durante su estancia...",fullContent:`**Cliente:** Hotel Boutique de Lujo con 50 habitaciones y clientela internacional
**Desafío:** Puntuación NPS baja (15) y feedback limitado de huéspedes durante la estancia
**Frustraciones Clave Identificadas**
*"El check-in tomó 20 minutos cuando llegué cansado después de un vuelo largo. Esperaba algo más fluido en un hotel de esta categoría"* - Huésped entrevistado
**Resultados**
- Mejora del NPS de 15 a 60 puntos en 6 meses
- Aumento del 35% en puntuaciones de satisfacción general
- Reducción del 50% en quejas formales post-estancia
- Incremento del 25% en reservas repetidas
¿Quieres saber más? Envíanos un email: info@lexic.ai`,author:"Equipo LexicPulse",date:"2024-03-05",category:"Caso de Estudio",readTime:"5 min de lectura",featured:!1},{id:4,title:"Startup de Gaming Aumenta Retención de Usuarios en 60% con Investigación Adaptativa de IA",slug:"startup-gaming-investigacion-usuario",excerpt:"Una startup de gaming utilizó entrevistas adaptativas con IA para entender mejor a sus jugadores y optimizar la experiencia de juego, logrando mejoras significativas en retención.",content:"Una startup de gaming implementó investigación de usuarios impulsada por IA para comprender mejor las necesidades de sus jugadores...",fullContent:`**Cliente:** Startup de Gaming con 100K+ usuarios activos mensuales
**Desafío:** Alta tasa de abandono de usuarios (75% en los primeros 7 días)
**Frustraciones Clave Identificadas**
*"El juego parecía increíble, pero no sabía por dónde empezar. Después de 10 minutos sin progreso real, lo dejé"* - Jugador entrevistado
**Resultados**
- Aumento de la retención a 7 días del 25% al 85%
- Mejora del 60% en la finalización del tutorial
- Incremento del 40% en el engagement con funcionalidades sociales
- Reducción del 50% en el tiempo hasta la primera compra in-app
¿Quieres saber más? Envíanos un email: info@lexic.ai`,author:"Equipo LexicPulse",date:"2024-02-28",category:"Caso de Estudio",readTime:"6 min de lectura",featured:!1},{id:5,title:"Cadena de Diagnóstico por Imagen Mejora Experiencia del Paciente en 50% con IA Conversacional",slug:"cadena-diagnostico-imagen-experiencia-paciente",excerpt:"Una cadena líder de clínicas de diagnóstico por imagen implementó entrevistas con IA para mejorar la experiencia del paciente y optimizar sus procesos operativos.",content:"Una cadena de clínicas de diagnóstico por imagen utilizó entrevistas automatizadas con IA para entender mejor las necesidades de los pacientes...",fullContent:`**Cliente:** Cadena de Clínicas de Diagnóstico por Imagen con 15 centros y 2000+ pacientes mensuales
**Desafío:** Ansiedad del paciente durante procedimientos y feedback limitado
**Frustraciones Clave Identificadas**
*"Nadie me explicó que el ruido de la resonancia sería tan fuerte. Me hubiera gustado estar mejor preparada"* - Paciente entrevistada
**Resultados**
- Mejora del 50% en puntuaciones de satisfacción del paciente
- Reducción del 30% en niveles de ansiedad reportados
- Aumento del 40% en la preparación adecuada para procedimientos
- Mejora del 35% en la percepción de comunicación médica
¿Quieres saber más? Envíanos un email: info@lexic.ai`,author:"Equipo LexicPulse",date:"2024-02-20",category:"Caso de Estudio",readTime:"5 min de lectura",featured:!1},{id:6,title:"Impulsa tu Formación: Cómo la IA Conversacional Transforma la Evaluación de Cursos y la Experiencia del Alumno",slug:"impulsa-formacion-ia-conversacional-evaluacion-cursos",excerpt:"Descubre cómo la IA conversacional está revolucionando la manera en que las empresas de formación obtienen feedback de sus alumnos y optimizan sus programas educativos.",content:"En el dinámico mundo de la formación y el desarrollo profesional, la capacidad de adaptarse y ofrecer programas que realmente satisfagan las necesidades de los alumnos es clave para el éxito...",fullContent:`En el dinámico mundo de la formación y el desarrollo profesional, la capacidad de adaptarse y ofrecer programas que realmente satisfagan las necesidades de los alumnos es clave para el éxito.
LexicPulse te permite:
- **Validar Ideas de Cursos:** Antes de invertir en un nuevo programa, lanza conversaciones con tu público objetivo.
- **Optimizar el Contenido de Aprendizaje:** Identifica qué módulos son más atractivos, dónde los alumnos encuentran dificultades.
- **Medir la Efectividad del Programa:** Más allá de la satisfacción, comprende el impacto real de tu formación.
- **Personalizar la Experiencia del Alumno:** Al entender las necesidades individuales y las preferencias de aprendizaje.
**¿Quieres saber más sobre este caso de uso? Envíanos un email: info@lexic.ai**`,author:"Equipo LexicPulse",date:"2024-06-20",category:"Educación",readTime:"8 min de lectura",featured:!0},{id:8,title:"Cómo el Feedback Basado en Voz Está Transformando el Desarrollo de Productos",slug:"feedback-voz-transformando-desarrollo-productos",excerpt:"Los métodos tradicionales de feedback están perdiendo efectividad. Descubre cómo el feedback basado en voz con IA conversacional está revolucionando el desarrollo de productos al capturar insights auténticos de usuarios a escala.",content:"El feedback basado en voz está transformando cómo los equipos de producto recopilan y analizan insights de usuarios.",fullContent:`## Por Qué el Feedback de Voz Importa en el Ciclo de Desarrollo de Productos Actual
Los métodos tradicionales de recopilación de feedback están perdiendo efectividad. El feedback basado en voz aborda esto proporcionando una comprensión auténtica y en tiempo real de las experiencias del usuario.
Según estudios recientes, las empresas que aprovechan las interacciones de voz ven **tasas de participación 40% más altas** comparado con formularios tradicionales.
## Casos de Uso para el Feedback de Voz en el Desarrollo de Productos
### Validación de Características
Recopila insights de voz auténticos antes de lanzar una característica.
### Feedback de Pruebas Beta
Automatiza entrevistas telefónicas a escala con análisis impulsado por IA.
### Experiencia Post-Lanzamiento
Comprende las reacciones reales de los clientes e identifica problemas de UX rápidamente.
¿Listo para reemplazar formularios estáticos con conversaciones reales? [Descubre cómo funciona Lexic Pulse](https://app.lexic.ai).`,author:"Equipo LexicPulse",date:"2024-08-30",category:"Desarrollo de Productos",readTime:"6 min lectura",featured:!1},{id:11,title:"La Brecha de Empatía: Por Qué los Dashboards Solos No Te Ayudarán a Entender a Tus Clientes",slug:"brecha-empatia-dashboards-entender-clientes",excerpt:"Descubre por qué las métricas tradicionales crean una peligrosa ilusión de comprensión y cómo la IA conversacional puede cerrar la brecha entre datos y empatía real.",content:"Las empresas se están ahogando en dashboards pero muriendo de hambre por insights reales. Descubre cómo pasar de métricas frías a conversaciones que revelan el verdadero sentimiento del cliente.",fullContent:`# La Brecha de Empatía: Por Qué los Dashboards Solos No Te Ayudarán a Entender a Tus Clientes
Cada lunes por la mañana, miles de líderes de CX abren sus dashboards con el mismo ritual. Los números están ahí, precisos y clínicos.
Pero luego viene el silencio. La pregunta más importante queda sin respuesta: **¿Por qué sucedió esto?**
Esto es lo que llamamos **la brecha de empatía**.
## Por Qué el Feedback Tradicional Se Queda Corto
**La fatiga de encuestas es real.** Los formularios largos y aburridos generan tasas de respuesta bajas.
**Las métricas sin contexto engañan.** El NPS te dice el pasado, no el futuro.
**El análisis cualitativo no escala.** Leerlos y codificarlos manualmente es lento, costoso y sesgado.
## De Dashboards a Conversaciones
Cerrar la brecha de empatía requiere un cambio de mentalidad: **de recopilar datos sobre clientes a tener conversaciones con ellos**.
Aquí es donde **la IA conversacional cambia el juego**.
## La Comprensión Es la Nueva Ventaja
Las empresas que prosperarán en la próxima década no serán aquellas con los dashboards más bonitos. Serán las que cierren la brecha de empatía.
Porque en la economía de hoy, **la empatía no es una habilidad blanda. Es el motor de crecimiento más poderoso que tienes**.`,author:"Equipo Lexic",date:"2025-09-15",category:"Investigación de Clientes",readTime:"8 min lectura",featured:!1}]},t4={exportDate:eie,version:tie,posts:nie},iie=["All","Blog Posts","Case Studies","Resources"],rie=t4.posts.en,sie=rie.map(t=>({id:t.id,title:t.title,excerpt:t.excerpt,category:t.category,date:t.date,readTime:t.readTime,slug:t.slug})),Rg=[...sie].sort((t,e)=>new Date(e.date).getTime()-new Date(t.date).getTime());function aie(t){return new Date(t).toLocaleDateString("en-GB",{month:"short",year:"numeric"})}const oie=new Set([13,101,102,103,104,105,106,107,108,109,110,111,112]);function lie(t){return oie.has(t.id)?`/the-signal/${t.slug}`:`/blog/${t.slug}`}const cb=t=>t==="Case Study",cie=()=>{const[t,e]=I.useState("All"),n=t==="All"?Rg:t==="Blog Posts"?Rg.filter(i=>!cb(i.category)):t==="Case Studies"?Rg.filter(i=>cb(i.category)):Rg.filter(i=>i.category==="Resource");return l.jsxs("section",{className:"relative w-full overflow-hidden",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)",fontFamily:"Quicksand, sans-serif"},children:[l.jsxs("div",{className:"px-6 md:px-16 lg:px-24 pt-24 pb-12 max-w-6xl mx-auto",children:[l.jsx(me.span,{className:"inline-block text-[#FF3478] text-xs font-medium uppercase tracking-[0.3em] mb-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:"Insights & Implementations"}),l.jsx(me.h2,{className:"text-3xl md:text-5xl lg:text-6xl font-light text-white leading-tight max-w-4xl mb-6",initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1},children:"Decoding the Signal: From Architectural Intent to Enterprise Outcome"}),l.jsx(me.p,{className:"text-white/60 text-base md:text-lg font-light leading-relaxed max-w-3xl mb-12",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.2},children:"Exploring the frontiers of conversational intelligence, agentic orchestration, and the strategic synthesis of human dialogue into high-fidelity knowledge engines."}),l.jsx(me.div,{className:"flex gap-6 md:gap-8 border-b border-white/10 pb-4",initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.3},children:iie.map(i=>l.jsx("button",{onClick:()=>e(i),className:`text-sm font-medium tracking-wide transition-colors duration-200 pb-1 ${t===i?"text-white border-b-2 border-white":"text-white/50 hover:text-white/80"}`,children:i},i))})]}),l.jsx("div",{className:"px-6 md:px-16 lg:px-24 pb-24 max-w-6xl mx-auto",children:l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:n.map((i,r)=>l.jsx(We,{to:lie(i),className:"block no-underline group",children:l.jsxs(me.div,{className:"bg-white/10 backdrop-blur-md border border-white/20 rounded-2xl p-8 flex flex-col justify-between min-h-[300px] transition-colors duration-300 cursor-pointer hover:bg-white/15 h-full",initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.08*(r%6)},children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[l.jsx("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:cb(i.category)?"#FF3478":"#4ade80"}}),l.jsx("span",{className:"text-white/70 text-xs font-medium uppercase tracking-wider",children:i.category})]}),l.jsx("h3",{className:"text-white text-lg font-light leading-snug mb-4 group-hover:text-white/90",children:i.title}),l.jsx("p",{className:"text-white/50 text-sm font-light leading-relaxed line-clamp-3",children:i.excerpt})]}),l.jsxs("div",{className:"flex items-center justify-between mt-6",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"text-white/40 text-sm font-light",children:aie(i.date)}),l.jsx("span",{className:"text-white/20 text-xs",children:"·"}),l.jsx("span",{className:"text-white/40 text-xs font-light",children:i.readTime})]}),l.jsx(qr,{size:18,className:"text-white/40 group-hover:text-white/80 transition-colors"})]})]})},i.id))})})]})},uie=()=>l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"The Signal - Insights and Case Studies - Lexic.AI",description:"Insights, case studies and thought leadership on AI-Moderated Interviews and conversational intelligence."}),l.jsx(un,{}),l.jsx(cie,{}),l.jsx(dn,{})]}),MM=I.forwardRef(({className:t,...e},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:oi("w-full caption-bottom text-sm",t),...e})}));MM.displayName="Table";const TM=I.forwardRef(({className:t,...e},n)=>l.jsx("thead",{ref:n,className:oi("[&_tr]:border-b",t),...e}));TM.displayName="TableHeader";const EM=I.forwardRef(({className:t,...e},n)=>l.jsx("tbody",{ref:n,className:oi("[&_tr:last-child]:border-0",t),...e}));EM.displayName="TableBody";const die=I.forwardRef(({className:t,...e},n)=>l.jsx("tfoot",{ref:n,className:oi("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));die.displayName="TableFooter";const Uf=I.forwardRef(({className:t,...e},n)=>l.jsx("tr",{ref:n,className:oi("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",t),...e}));Uf.displayName="TableRow";const Yl=I.forwardRef(({className:t,...e},n)=>l.jsx("th",{ref:n,className:oi("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));Yl.displayName="TableHead";const Ql=I.forwardRef(({className:t,...e},n)=>l.jsx("td",{ref:n,className:oi("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));Ql.displayName="TableCell";const hie=I.forwardRef(({className:t,...e},n)=>l.jsx("caption",{ref:n,className:oi("mt-4 text-sm text-muted-foreground",t),...e}));hie.displayName="TableCaption";const fie={"@context":"https://schema.org","@type":"Article",headline:"The Operational Blindness Crisis: Why Legacy Sampling and Low-Response Surveys are Killing B2B Growth",description:"Discover how operational blindness—caused by legacy 1% sampling and 5% survey response rates—creates revenue leaks and compliance risk, and how Lexic Pulse Total Intelligence solves it.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/operational-blindness-crisis"},pie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"What is operational blindness in B2B customer intelligence?",acceptedAnswer:{"@type":"Answer",text:"Operational blindness is the systemic inability of B2B organisations to see and act on the vast majority of their customer interactions. Most Voice-of-Customer programmes audit fewer than 1 in 100 conversations, leaving decision-makers with a dangerously incomplete picture. Lexic Pulse Total Customer Intelligence eliminates this gap by processing every interaction across all channels."}},{"@type":"Question",name:"Why is 1% manual call center sampling a risk for compliance?",acceptedAnswer:{"@type":"Answer",text:"Regulatory frameworks like GDPR, MiFID II, and FCA Consumer Duty expect firms to demonstrate understanding of customer outcomes at scale, not through spot checks. Sampling only 1% of interactions makes it statistically impossible to detect rare but high-impact compliance failures such as mis-selling or consent violations. Lexic Pulse Double Helix architecture analyses 100% of interactions against compliance rubrics in real time."}},{"@type":"Question",name:"How do legacy survey response rates compare to AI-moderated interviews?",acceptedAnswer:{"@type":"Answer",text:"Legacy post-interaction surveys average only 5–8% response rates with high self-selection bias and shallow closed-ended data. Lexic Pulse Total Intelligence analyses 100% of interactions with neutral AI moderation, delivering open conversational depth and real-time dashboards. This replaces weeks-long reporting cycles with immediate, unbiased insight across every channel."}},{"@type":"Question",name:"What are the hidden costs of unanalyzed omnichannel interactions?",acceptedAnswer:{"@type":"Answer",text:"Every unanalysed interaction is a missed signal that compounds into silent churn, preventable escalations, missed upsell cues, and brand-damaging friction. Silent churners cost 5× more to replace than retain, while undetected friction patterns inflate support costs by 15–30%. Lexic Pulse Double Helix model captures both explicit feedback and implicit behavioural signals to eliminate these blind spots."}}]},mie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(fie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(pie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Operational Blindness Crisis – Lexic Pulse Total Intelligence",description:"Discover how operational blindness—caused by legacy 1% sampling and 5% survey response rates—creates revenue leaks and compliance risk. Learn how Lexic Pulse solves it.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"The Operational Blindness Crisis: Why Legacy Sampling and Low-Response Surveys are Killing B2B Growth."})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:"Operational blindness is an intelligence crisis where B2B leaders rely on legacy sampling—often auditing only 1% of customer interactions or receiving 5% survey response rates. This leaves 99% of customer data invisible, resulting in undetected revenue leaks and compliance liabilities. Solving this requires a paradigm shift from representative sampling to total interaction visibility."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is operational blindness in B2B customer intelligence?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:"Operational blindness describes the systemic inability of B2B organisations to see, measure, and act on the vast majority of their customer interactions. While teams believe their Voice-of-Customer programmes capture representative insights, the reality is starkly different: most programmes audit fewer than 1 in 100 conversations, leaving decision-makers flying blind."}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:[l.jsx("strong",{children:"Lexic Pulse"})," Total Customer Intelligence was designed to eliminate this gap. By processing every interaction—calls, chats, emails, and AI-moderated interviews—",l.jsx("strong",{children:"Lexic Pulse"})," replaces guesswork with full-spectrum visibility across the entire customer journey."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Traditional QA teams manually score roughly ",l.jsx("strong",{children:"1–2%"})," of call-centre volume."]}),l.jsxs("li",{children:["Post-interaction surveys average a ",l.jsx("strong",{children:"5–8%"})," response rate, heavily skewed toward extremes."]}),l.jsx("li",{children:"Omnichannel touchpoints—chat, social, in-app—are often excluded from analysis entirely."}),l.jsx("li",{children:"The result: strategic decisions built on a fragment of reality."})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why is 1% manual call center sampling a risk for compliance?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:"Regulatory frameworks such as GDPR, MiFID II, and the FCA's Consumer Duty increasingly expect firms to demonstrate that they understand customer outcomes at scale—not through spot checks. When an organisation samples only 1% of interactions, it is statistically impossible to detect rare but high-impact compliance failures such as mis-selling, consent violations, or vulnerable-customer mis-handling."}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The ",l.jsx("strong",{children:"Lexic Pulse"})," Double Helix architecture solves this by running dual analysis layers—passive listening and active probing—across 100% of interactions. This means every conversation is scored against compliance rubrics in real time, not weeks later by a manual auditor."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Manual sampling misses ",l.jsx("strong",{children:"98–99%"})," of potential compliance breaches."]}),l.jsxs("li",{children:["Regulators now expect evidence of ",l.jsx("strong",{children:"systematic"})," monitoring, not sample-based assurance."]}),l.jsxs("li",{children:["A single undetected mis-selling event can trigger fines exceeding ",l.jsx("strong",{children:"€10 million"})," under GDPR."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Lexic Pulse"})," Total Intelligence provides audit-ready evidence across every channel."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How do legacy survey response rates compare to AI-moderated interviews?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-6",children:["Legacy surveys suffer from declining engagement, self-selection bias, and shallow data. AI-moderated interviews—powered by ",l.jsx("strong",{children:"Lexic Pulse"})," conversational intelligence—deliver deeper, richer insight from every respondent. The table below illustrates the structural gap."]}),l.jsx("div",{className:"rounded-xl border border-gray-200 overflow-hidden mb-6",children:l.jsxs(MM,{children:[l.jsx(TM,{children:l.jsxs(Uf,{className:"bg-[#150835] hover:bg-[#150835]",children:[l.jsx(Yl,{className:"text-white font-medium text-sm",children:"Dimension"}),l.jsx(Yl,{className:"text-white font-medium text-sm",children:"Legacy Sampling"}),l.jsx(Yl,{className:"text-white font-medium text-sm",children:"Lexic Pulse Total Intelligence"})]})}),l.jsx(EM,{children:[["Response rate","5–8%","100% of interactions analysed"],["Interaction coverage","1–2% manually audited","100% automated analysis"],["Bias","High self-selection bias","Neutral AI moderation"],["Data depth","Closed-ended scales","Open conversational depth"],["Time to insight","Weeks","Real-time dashboards"],["Compliance evidence","Spot-check only","Full audit trail"]].map(([t,e,n],i)=>l.jsxs(Uf,{className:i%2===0?"bg-gray-50":"bg-white",children:[l.jsx(Ql,{className:"font-medium text-sm",children:t}),l.jsx(Ql,{className:"text-sm font-light",children:e}),l.jsx(Ql,{className:"text-sm font-light",children:n})]},i))})]})}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["By replacing static questionnaires with adaptive, AI-driven conversations, ",l.jsx("strong",{children:"Lexic Pulse"})," Total Customer Intelligence captures nuance that surveys structurally cannot. Respondents engage for longer, provide richer verbatim, and reveal latent needs that closed-ended scales miss entirely."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the hidden costs of unanalyzed omnichannel interactions?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:"Every unanalysed interaction is a missed signal. When organisations ignore 99% of their customer data, they accumulate hidden costs that compound over time: silent churn, preventable escalations, missed upsell cues, and brand-damaging friction that never reaches a dashboard."}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The ",l.jsx("strong",{children:"Lexic Pulse"})," Double Helix model captures both explicit feedback and implicit behavioural signals from every channel. This dual-layer approach transforms raw interactions into structured, actionable intelligence—eliminating the blind spots where revenue quietly leaks."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Silent churn:"})," customers who leave without complaint cost 5× more to replace than to retain."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Escalation blindness:"})," undetected friction patterns inflate support costs by 15–30%."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Revenue leakage:"})," missed cross-sell and upsell signals from chat and email interactions."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Reputation risk:"})," negative sentiment spreading on unmonitored channels erodes brand equity."]})]})]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),gie={"@context":"https://schema.org","@type":"Article",headline:"Why NPS is a Lagging Indicator: Identifying Friction in the 99% of Unanalyzed Interaction Data",description:"Net Promoter Score is a lagging indicator. Learn how Total Customer Intelligence uses AI to audit 100% of passive interaction data to reveal the root cause of churn before a survey is ever sent.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/nps-lagging-indicator-churn"},xie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Why is my NPS score dropping if support volume is stable?",acceptedAnswer:{"@type":"Answer",text:"NPS captures retrospective sentiment from a small, self-selected sample. Stable support volume does not mean stable customer experience—friction often hides in the 99% of interactions that NPS never measures. Lexic Pulse Total Customer Intelligence analyses every interaction to surface hidden detractors who never fill out surveys."}},{"@type":"Question",name:"How can I track customer friction without relying on surveys?",acceptedAnswer:{"@type":"Answer",text:"By deploying a Passive Engine that analyses 100% of calls, chats, and emails in real time, organisations can detect friction signals—sentiment shifts, repeated contacts, escalation patterns—without depending on voluntary survey responses. Lexic Pulse makes this possible across every channel."}},{"@type":"Question",name:"What are the most common blind spots in a B2B customer journey?",acceptedAnswer:{"@type":"Answer",text:"The most common blind spots include unmonitored chat and email channels, silent churners who leave without complaint, and friction patterns that only emerge when analysing interactions at scale. Legacy sampling methods miss these entirely because they audit fewer than 1% of total interactions."}}]},yie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(gie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(xie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Why NPS is a Lagging Indicator – Lexic Pulse Total Intelligence",description:"Net Promoter Score is a lagging indicator. Learn how Total Customer Intelligence uses AI to audit 100% of passive interaction data to reveal the root cause of churn.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Why NPS is a Lagging Indicator: Identifying Friction in the 99% of Unanalyzed Interaction Data"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:"Net Promoter Score (NPS) is a lagging indicator because it relies on retrospective feedback from a small sample of self-selected respondents. To identify real-time friction, B2B leaders must shift to Total Customer Intelligence, which uses AI to audit 100% of passive interaction data (calls, chats, emails). This reveals the root cause of churn long before a survey is ever sent."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why is my NPS score dropping if support volume is stable?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Your NPS score is dropping despite stable support volume because NPS is fundamentally flawed as an early warning system; it only captures the extreme emotions of the vocal minority. The silent majority of your customers—those experiencing micro-frictions, confusing UI elements, or mildly frustrating billing issues—rarely take the time to fill out a survey. They simply churn. By relying solely on an average response rate of less than 8%, you are operating entirely in the dark regarding the ",l.jsx("strong",{children:"92% of users"})," who interact with your brand but remain silent. To truly understand this drop, you must analyze the unstructured data hidden within their daily interactions, not just the surveys they ignore."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["NPS only captures the ",l.jsx("strong",{children:"vocal minority"}),"—the extreme promoters and detractors."]}),l.jsxs("li",{children:["The ",l.jsx("strong",{children:"silent majority"})," experiencing micro-frictions churn without ever filling out a survey."]}),l.jsxs("li",{children:["With less than ",l.jsx("strong",{children:"8% response rates"}),", 92% of your customer base remains invisible to NPS."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How can I track customer friction without relying on surveys?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["You can track customer friction without surveys by deploying ",l.jsx("strong",{children:"Total Customer Intelligence"})," to passively audit 100% of your existing omnichannel interactions. Instead of asking customers how they feel weeks after an event, AI-driven passive listening engines instantly analyze the context, sentiment, and intent of every support ticket, live chat, and phone call. This means every sigh on a call or frustrated keyword in a chat is captured and categorized in real-time. ",l.jsx("strong",{children:"Lexic Pulse"})," correlates this massive dataset to map out exactly where the customer journey breaks down, allowing you to proactively fix issues before they escalate into a lost account or a negative review."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["AI-driven passive listening engines analyze ",l.jsx("strong",{children:"every support ticket, live chat, and phone call"}),"."]}),l.jsxs("li",{children:["Every sigh on a call or frustrated keyword is ",l.jsx("strong",{children:"captured and categorized in real-time"}),"."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Lexic Pulse"})," maps exactly where the customer journey breaks down—proactively, not reactively."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the most common blind spots in a B2B customer journey?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:['The most common blind spots in a B2B customer journey occur in the transitions between onboarding, daily product usage, and ongoing customer support—the very areas where traditional surveys fail to reach. Companies often miss "hidden detractors," users who experience recurring, low-level friction but never trigger a formal complaint or fill out an NPS form. Because ',l.jsx("strong",{children:"Lexic Pulse"})," audits 100% of your passive support data, it correlates hidden emotional signals across these touchpoints. It illuminates the 99% of unanalyzed interactions, revealing the exact systemic failures causing silent churn, transforming your CX strategy from a reactive apology tour into a ",l.jsx("strong",{children:"proactive retention engine"}),"."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Hidden detractors:"})," users with recurring, low-level friction who never trigger formal complaints."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Journey transitions:"})," handoffs between onboarding, usage, and support are where friction compounds undetected."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Lexic Pulse"})," transforms CX from a reactive apology tour into a proactive retention engine."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["To understand how these insights fit into a broader framework, read our full guide on"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),vie={"@context":"https://schema.org","@type":"Article",headline:"Beyond the 1% Audit: How AI Automates 100% of Call Center Quality Assurance",description:"Learn how to replace manual 1% call center sampling with AI-driven omnichannel auditing that analyses every interaction for compliance, sentiment, and efficiency.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/automated-call-center-qa-framework"},wie={"@context":"https://schema.org","@type":"HowTo",name:"How to Automate 100% of Call Center Quality Assurance with AI",description:"A step-by-step framework for replacing manual 1% sampling with AI-driven omnichannel QA auditing.",step:[{"@type":"HowToStep",name:"Audit current sampling coverage",text:"Measure the percentage of interactions currently reviewed by manual QA teams. Most organisations audit fewer than 1–2% of total call volume."},{"@type":"HowToStep",name:"Deploy passive AI analysis across all channels",text:"Implement an AI-driven passive engine like Lexic Pulse to analyse 100% of calls, chats, and emails against compliance rubrics and quality scorecards in real time."},{"@type":"HowToStep",name:"Establish automated compliance monitoring",text:"Configure automated alerts for compliance violations, sentiment anomalies, and process deviations to replace manual spot-check auditing."},{"@type":"HowToStep",name:"Measure ROI and continuous improvement",text:"Track cost savings from reduced manual auditing, compliance risk reduction, and operational efficiency gains against the baseline established in Step 1."}]},bie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(vie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(wie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Automated Call Center QA Framework – Lexic Pulse Total Intelligence",description:"Replace manual 1% call center sampling with AI-driven omnichannel auditing. Analyse every interaction for compliance, sentiment, and efficiency with Lexic Pulse.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Beyond the 1% Audit: How AI Automates 100% of Call Center Quality Assurance"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:"Automating call center Quality Assurance (QA) requires replacing manual 1% sampling with AI-driven omnichannel auditing. By analyzing every interaction for compliance, sentiment, and efficiency, companies eliminate the high costs of manual audits and identify systemic risks that 1% sampling misses. Lexic Pulse enables this through a passive engine that monitors 100% of service interactions in real-time."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the hidden costs of manual call center quality assurance?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:`The hidden costs of manual call center quality assurance extend far beyond the salaries of the QA team; they lie in the massive compliance liabilities and customer churn generated by the 99% of calls that go unaudited. Relying on human sampling means you are effectively guessing about your service quality based on a statistically insignificant 1% fraction of data. This "operational blindness" leads to undiscovered regulatory breaches, unchecked agent inefficiencies, and escalating operational costs. Ultimately, the true cost is the lost revenue from frustrated customers whose poor experiences were permanently buried in the unmonitored void of your contact center's daily volume.`}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["The ",l.jsx("strong",{children:"99% of calls that go unaudited"})," represent massive compliance liabilities."]}),l.jsxs("li",{children:['"Operational blindness" leads to ',l.jsx("strong",{children:"undiscovered regulatory breaches"})," and unchecked agent inefficiencies."]}),l.jsxs("li",{children:["The true cost is ",l.jsx("strong",{children:"lost revenue"})," from frustrated customers buried in the unmonitored void."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How do I automate 100% of call center compliance audits with AI?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["You automate 100% of call center compliance audits by integrating a passive AI listening engine, like ",l.jsx("strong",{children:"Lexic Pulse"}),", directly into your existing communication stack. The system ingests every voice call and text interaction in real-time, instantly transcribing and analyzing the dialogue against your specific compliance checklists, mandatory scripts, and regulatory requirements. Instead of a human supervisor randomly selecting a handful of calls each week, the AI evaluates every single interaction, immediately flagging violations, script deviations, or aggressive behavior. This guarantees total operational visibility, allowing your QA team to shift from manual data collection to strategic coaching and instant risk mitigation."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["The AI evaluates ",l.jsx("strong",{children:"every single interaction"}),", immediately flagging violations and script deviations."]}),l.jsxs("li",{children:["Real-time transcription and analysis against your ",l.jsx("strong",{children:"specific compliance checklists"}),"."]}),l.jsxs("li",{children:["QA teams shift from manual data collection to ",l.jsx("strong",{children:"strategic coaching and instant risk mitigation"}),"."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the ROI of switching from manual sampling to AI-driven QA?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-6",children:["The ROI of switching from manual sampling to AI-driven QA is realized through a massive reduction in operational overhead, immediate mitigation of compliance fines, and a significant decrease in customer churn. By automating the QA process across 100% of interactions, companies typically reduce feedback analysis time by ",l.jsx("strong",{children:"90%"})," while simultaneously increasing their risk coverage from a mere 1% to absolute total visibility. This technological leap frees your quality assurance personnel to focus entirely on high-value coaching and strategic process improvements, turning your call center from a reactive cost center into a ",l.jsx("strong",{children:"proactive, data-driven hub"})," of total customer intelligence."]}),l.jsx("div",{className:"rounded-xl border border-gray-200 overflow-hidden mb-6",children:l.jsxs(MM,{children:[l.jsx(TM,{children:l.jsxs(Uf,{className:"bg-[#150835] hover:bg-[#150835]",children:[l.jsx(Yl,{className:"text-white font-medium text-sm",children:"Metric"}),l.jsx(Yl,{className:"text-white font-medium text-sm",children:"Manual QA (The 1% Myth)"}),l.jsx(Yl,{className:"text-white font-medium text-sm",children:"AI QA (Total Intelligence)"})]})}),l.jsx(EM,{children:[["Interaction Coverage","~1% to 2%","100% of all calls/chats"],["Analysis Speed","Days to weeks","Real-time / Instant"],["Compliance Liability","Extreme (99% unmonitored)","Eliminated (Automated flagging)"],["QA Team Function","Data entry & transcription","Strategic coaching & process design"]].map(([t,e,n],i)=>l.jsxs(Uf,{className:i%2===0?"bg-gray-50":"bg-white",children:[l.jsx(Ql,{className:"font-medium text-sm",children:t}),l.jsx(Ql,{className:"text-sm font-light",children:e}),l.jsx(Ql,{className:"text-sm font-light",children:n})]},i))})]})}),l.jsx("p",{className:"text-base leading-relaxed font-light text-sm italic text-gray-500",children:"Note: Implementing the steps outlined in this framework can be structurally enhanced using HowTo schema markup to ensure Answer Engines parse your operational shift accurately."})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["To understand how these insights fit into a broader framework, read our full guide on"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),_ie={"@context":"https://schema.org","@type":"Article",headline:"Market Validation at AI Speed: Replacing Slow Focus Groups with WhatsApp AI Agents",description:"Learn how AI-moderated interviews via WhatsApp replace slow focus groups, delivering deep qualitative validation from global panels in under 48 hours with 80% response rates.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/ai-moderated-market-research-speed"},Sie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"What is the fastest way to validate a new product feature with real users?",acceptedAnswer:{"@type":"Answer",text:"AI-moderated interviews via WhatsApp allow brands to validate product features with global panels of millions in under 48 hours. Unlike traditional focus groups that take weeks to recruit and conduct, Lexic Pulse Active Engine deploys adaptive conversational agents that achieve 80% response rates and capture deep qualitative insight at scale."}},{"@type":"Question",name:"Why are traditional market research focus groups failing in SaaS?",acceptedAnswer:{"@type":"Answer",text:"Traditional focus groups fail in SaaS because they are too slow for rapid iteration cycles, too expensive for continuous validation, and too small in sample size to be statistically meaningful. They also suffer from groupthink bias and geographical limitations that AI-moderated interviews eliminate entirely."}},{"@type":"Question",name:"How can I conduct qualitative research interviews at scale using WhatsApp?",acceptedAnswer:{"@type":"Answer",text:'Lexic Pulse Active Engine deploys autonomous AI agents on WhatsApp that conduct adaptive, two-way conversational interviews. These agents dig into the "why" behind user responses, following up on interesting threads in real time. This approach reaches global audiences on their preferred channel and yields rich verbatim data at a fraction of the cost of traditional moderated research.'}}]},Aie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(_ie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Sie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"AI-Moderated Market Research at Speed – Lexic Pulse Total Intelligence",description:"Replace slow focus groups with WhatsApp AI agents. Get deep qualitative validation from global panels in under 48 hours with 80% response rates.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Market Validation at AI Speed: Replacing Slow Focus Groups with WhatsApp AI Agents"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:"Validating a new SaaS feature or market hypothesis no longer requires weeks of traditional focus groups. AI-moderated interviews via WhatsApp allow brands to reach global panels of millions and get deep qualitative validation in under 48 hours. This Active Engine approach yields 80% response rates, far outperforming static forms and slow traditional research methods."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the fastest way to validate a new product feature with real users?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The fastest way to validate a new product feature with real users is to deploy AI-moderated conversational agents through high-engagement channels like WhatsApp. Instead of waiting weeks to recruit and run traditional focus groups, you can instantly activate a global panel of over ",l.jsx("strong",{children:"4 million vetted participants"}),". Lexic Pulse's active engine initiates 2-minute, natural-language interviews that adapt in real-time to the user's responses, probing deeper into their pain points and desired outcomes. This approach guarantees qualitative validation at unprecedented speed, delivering deep, actionable product insights to your dashboard in ",l.jsx("strong",{children:"under 48 hours"})," so your engineering team never builds in the dark."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Instantly activate a global panel of over ",l.jsx("strong",{children:"4 million vetted participants"})," via WhatsApp."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"2-minute natural-language interviews"})," that adapt in real-time to each user's responses."]}),l.jsxs("li",{children:["Deep, actionable product insights delivered to your dashboard in ",l.jsx("strong",{children:"under 48 hours"}),"."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why are traditional market research focus groups failing in SaaS?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Traditional market research focus groups are failing in the SaaS industry because they are fundamentally ",l.jsx("strong",{children:"too slow, prohibitively expensive, and heavily biased by group dynamics"}),`. In a landscape where agile development cycles demand immediate user feedback, waiting six to eight weeks and spending tens of thousands of dollars to validate a single hypothesis is a strategic liability. Furthermore, participants in a physical room often succumb to "groupthink," skewing the data and hiding true individual intent. SaaS leaders require continuous, unbiased, and scalable validation—a need that static surveys and outdated physical focus groups simply cannot fulfill in today's rapid-fire digital economy.`]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Focus groups are ",l.jsx("strong",{children:"too slow"})," for agile development cycles demanding immediate feedback."]}),l.jsxs("li",{children:["Participants succumb to ",l.jsx("strong",{children:'"groupthink,"'})," skewing data and hiding true individual intent."]}),l.jsxs("li",{children:["SaaS leaders need ",l.jsx("strong",{children:"continuous, unbiased, scalable"})," validation—not 6–8 week studies."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How can I conduct qualitative research interviews at scale using WhatsApp?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["You can conduct qualitative research interviews at scale using WhatsApp by leveraging ",l.jsx("strong",{children:"Lexic Pulse's"})," advanced, adaptive AI conversational agents. When deployed, these agents initiate friendly, two-way dialogues directly on the user's mobile device, achieving response rates upwards of ",l.jsx("strong",{children:"80%"}),' by eliminating survey fatigue. The AI does not just ask static questions; it understands intent and emotion, dynamically asking follow-up questions to uncover the crucial "why" behind every answer. This transforms qualitative research from a slow, manual process into an ',l.jsx("strong",{children:"automated, high-fidelity data stream"}),", allowing you to instantly gather deep market intelligence from thousands of users simultaneously."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Response rates upwards of ",l.jsx("strong",{children:"80%"})," by eliminating survey fatigue on users' preferred channel."]}),l.jsxs("li",{children:["AI understands ",l.jsx("strong",{children:"intent and emotion"}),', dynamically probing the "why" behind every answer.']}),l.jsxs("li",{children:["Qualitative research becomes an ",l.jsx("strong",{children:"automated, high-fidelity data stream"})," at scale."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["To understand how these insights fit into a broader framework, read our full guide on"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Mie={"@context":"https://schema.org","@type":"Article",headline:"The Anatomy of a 'Gone Dark' Deal: Uncovering Hidden Pipeline Leaks with Passive Audits",description:"Learn how passive interaction auditing uses AI to automatically analyze sales calls and emails, mapping deal-loss patterns that traditional CRM fields never capture.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/automatic-deal-loss-attribution-ai"},Tie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Why do B2B deals frequently stall after the initial demo stage?",acceptedAnswer:{"@type":"Answer",text:"B2B deals stall post-demo when sales teams miss subtle friction signals during discovery—objections that were acknowledged but not resolved, competitor mentions that went unaddressed, or stakeholder concerns that were never surfaced. Lexic Pulse Passive Engine detects these signals by analysing every sales interaction, revealing the exact moments where deals begin to disengage."}},{"@type":"Question",name:"How can I automatically track the real reasons for deal losses in my CRM?",acceptedAnswer:{"@type":"Answer",text:'Traditional CRM loss reasons are self-reported by sales reps and notoriously unreliable—"budget" and "timing" account for 70% of entries regardless of actual cause. Lexic Pulse Total Customer Intelligence analyses the full conversation history of every deal to map objective deal-loss patterns, automatically attributing losses to specific friction points detected in calls and emails.'}},{"@type":"Question",name:"What are the most common reasons sales teams fail to qualify leads effectively?",acceptedAnswer:{"@type":"Answer",text:"The most common qualification failures stem from incomplete discovery—reps asking surface-level questions, failing to identify all decision-makers, or missing competitive dynamics. Passive interaction auditing reveals these patterns at scale by comparing the conversation behaviours of top performers against the rest of the team."}}]},Eie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Mie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Tie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Automatic Deal Loss Attribution with AI – Lexic Pulse Total Intelligence",description:"Uncover hidden pipeline leaks with passive audits. AI analyses every sales interaction to map deal-loss patterns that CRM fields never capture.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"The Anatomy of a 'Gone Dark' Deal: Uncovering Hidden Pipeline Leaks with Passive Audits"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:'Deals "go dark" when sales teams miss subtle friction signals during the discovery phase. Passive interaction auditing uses AI to automatically analyze sales calls and emails, mapping deal-loss patterns that traditional CRM fields never capture. Total Customer Intelligence helps CROs scale winning behaviors by identifying exactly what top performers do differently.'})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why do B2B deals frequently stall after the initial demo stage?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["B2B deals frequently stall after the initial demo stage because sales representatives miss critical, subtle friction signals during the discovery and presentation phases. While the rep might log the call as a success in the CRM, underlying objections regarding ",l.jsx("strong",{children:"pricing complexity, integration fears"}),', or unspoken competitor preferences often go unaddressed. These micro-hesitations compound, causing the prospect to silently disengage and "go dark" rather than explicitly rejecting the proposal. Without total visibility into the actual conversational dynamics of the demo, sales leaders are left guessing, relying on biased rep intuition rather than objective interaction data to understand why the pipeline is leaking.']}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Underlying objections regarding ",l.jsx("strong",{children:"pricing complexity and integration fears"})," go unaddressed."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Micro-hesitations"}),' compound, causing prospects to silently disengage and "go dark."']}),l.jsxs("li",{children:["Sales leaders rely on ",l.jsx("strong",{children:"biased rep intuition"})," rather than objective interaction data."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How can I automatically track the real reasons for deal losses in my CRM?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["You can automatically track the real reasons for deal losses in your CRM by implementing a passive interaction auditing system that analyzes 100% of your sales communications. ",l.jsx("strong",{children:"Lexic Pulse's"}),' passive engine seamlessly ingests every sales call, email, and video meeting, using AI to detect exactly where conversations derailed. Instead of relying on reps to manually select a generic "Closed Lost" reason from a drop-down menu, the AI extracts the ',l.jsx("strong",{children:"precise conversational context"}),"—such as a specific feature gap or budget pushback—and automatically enriches your CRM. This eliminates human bias and gives revenue leaders the unvarnished truth about their pipeline."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Lexic Pulse"})," ingests every sales call, email, and video meeting automatically."]}),l.jsxs("li",{children:["AI extracts ",l.jsx("strong",{children:"precise conversational context"}),' instead of generic "Closed Lost" drop-down reasons.']}),l.jsxs("li",{children:["Eliminates ",l.jsx("strong",{children:"human bias"})," and gives revenue leaders the unvarnished truth about their pipeline."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the most common reasons sales teams fail to qualify leads effectively?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The most common reasons sales teams fail to qualify leads effectively stem from ",l.jsx("strong",{children:"rigid adherence to generic scripts"})," and the inability to actively listen for hidden objections. Reps often rush to pitch features rather than diagnosing the prospect's true operational pain, completely missing the nuanced conversational cues that indicate a poor fit. By utilizing passive interaction audits, CROs can map these exact qualification failures at scale. For example, ",l.jsx("strong",{children:"Lexic Pulse"})," recently revealed how a sales team consistently lost deals because reps failed to record a specific competitor mentioned in ",l.jsx("strong",{children:"40% of early-stage calls"}),", a critical blind spot that manual CRM data never captured."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Rigid adherence to generic scripts"})," prevents reps from diagnosing true operational pain."]}),l.jsxs("li",{children:["A specific competitor was mentioned in ",l.jsx("strong",{children:"40% of early-stage calls"})," but never recorded in CRM."]}),l.jsxs("li",{children:["Passive interaction audits let CROs ",l.jsx("strong",{children:"map qualification failures at scale"})," and coach accordingly."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["To understand how these insights fit into a broader framework, read our full guide on"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Cie={"@context":"https://schema.org","@type":"Article",headline:"AI-Moderated Qualitative Interviews: The End of Slow Market Research",description:"AI-Moderated Interviews use autonomous AI agents to conduct adaptive, two-way conversations with global panels, achieving 80% response rates on WhatsApp and delivering results in under 48 hours.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/ai-moderated-qualitative-interviews"},Pie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"How do AI-moderated interviews replace traditional focus groups?",acceptedAnswer:{"@type":"Answer",text:"AI-moderated interviews replace traditional focus groups by eliminating geographic constraints, groupthink, and slowness. Lexic Pulse's Active Engine launches thousands of one-on-one conversations simultaneously, using natural language processing to conduct deep qualitative interviews at quantitative scale without the six-week agency wait time."}},{"@type":"Question",name:"Why is WhatsApp the most effective channel for AI research agents?",acceptedAnswer:{"@type":"Answer",text:"WhatsApp removes the friction of participation by meeting users in their native communication environment. Unlike email surveys that feel like homework, an AI agent on WhatsApp feels like a low-pressure, asynchronous chat, which drives Lexic Pulse's 80% response rates."}},{"@type":"Question",name:"How does the Active Engine ensure data quality in qualitative research?",acceptedAnswer:{"@type":"Answer",text:"The Active Engine ensures data quality through dynamic intent recognition and adaptive probing. If an answer is vague, the AI dynamically generates a follow-up question to extract the root cause, guaranteeing high-fidelity insights while filtering out low-effort responses."}},{"@type":"Question",name:"What is the cost and time ROI of AI-moderated market validation?",acceptedAnswer:{"@type":"Answer",text:"The ROI of AI-moderated market validation reduces research cycles from 8 weeks to under 48 hours and cuts agency costs by up to 70%. It allows leaders to validate hypotheses over the weekend, preventing wasted capital on unvalidated products."}}]},Nie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Cie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Pie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"AI-Moderated Qualitative Interviews: The End of Slow Market Research – Lexic Pulse",description:"AI-Moderated Interviews use autonomous AI agents for adaptive two-way conversations with global panels, achieving 80% response rates on WhatsApp in under 48 hours.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"AI-Moderated Qualitative Interviews: The End of Slow Market Research"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:['AI-Moderated Interviews are an advanced qualitative research method that uses autonomous AI agents to conduct adaptive, two-way conversations with global panels or internal databases. Unlike static surveys, these AI agents use natural language to probe for deeper "why" insights, achieving response rates as high as ',l.jsx("strong",{children:"80%"})," on platforms like WhatsApp and delivering results in ",l.jsx("strong",{children:"under 48 hours"}),"."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How do AI-moderated interviews replace traditional focus groups?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["AI-moderated interviews replace traditional focus groups by eliminating the three biggest flaws of legacy research: ",l.jsx("strong",{children:"geographic constraints, groupthink, and paralyzing slowness"}),". Instead of locking eight people in a room for two hours and hoping the loudest voice doesn't bias the room, Lexic Pulse's Active Engine launches thousands of one-on-one, uninfluenced conversations simultaneously. It uses natural language processing to conduct deep qualitative interviews at quantitative scale, giving Product and Marketing leaders statistically significant qualitative validation without the six-week agency wait time."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Eliminates ",l.jsx("strong",{children:"geographic constraints, groupthink, and slowness"})," of legacy research."]}),l.jsxs("li",{children:["Launches ",l.jsx("strong",{children:"thousands of one-on-one conversations"})," simultaneously."]}),l.jsxs("li",{children:["Delivers statistically significant qualitative validation ",l.jsx("strong",{children:"without the six-week wait"}),"."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why is WhatsApp the most effective channel for AI research agents?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["WhatsApp is the most effective channel for AI research agents because it inherently removes the friction of participation by meeting users in their ",l.jsx("strong",{children:"native, daily communication environment"}),". Traditional email surveys feel like administrative homework, leading to single-digit response rates. In contrast, an AI agent interacting via WhatsApp feels like a low-pressure, asynchronous chat. Respondents can answer a question while waiting for a coffee, putting down their phone, and picking up the conversation later. This frictionless, conversational UX is the primary driver behind the ",l.jsx("strong",{children:"80% response rates"})," achieved by Lexic Pulse."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Meets users in their ",l.jsx("strong",{children:"native, daily communication environment"}),"."]}),l.jsxs("li",{children:["Feels like a ",l.jsx("strong",{children:"low-pressure, asynchronous chat"})," rather than homework."]}),l.jsxs("li",{children:["Drives ",l.jsx("strong",{children:"80% response rates"})," through frictionless conversational UX."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does the Active Engine ensure data quality in qualitative research?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The Active Engine ensures data quality in qualitative research through ",l.jsx("strong",{children:"dynamic intent recognition and adaptive probing"}),'. A static form accepts whatever junk text a user types just to get an incentive. An AI agent, however, analyzes the response in real-time. If an answer is vague (e.g., "The UI is confusing"), the AI dynamically generates a follow-up ("Could you tell me which specific screen or button caused the confusion?"). By continuously probing until the root cause is extracted, Lexic Pulse guarantees ',l.jsx("strong",{children:"high-fidelity insights"})," while filtering out low-effort responses."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Uses ",l.jsx("strong",{children:"dynamic intent recognition"})," to analyze responses in real-time."]}),l.jsxs("li",{children:["Generates ",l.jsx("strong",{children:"adaptive follow-up questions"})," to extract root causes."]}),l.jsxs("li",{children:["Filters out low-effort responses while guaranteeing ",l.jsx("strong",{children:"high-fidelity insights"}),"."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the cost and time ROI of AI-moderated market validation?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The cost and time ROI of AI-moderated market validation is transformational, typically ",l.jsx("strong",{children:"reducing research cycles from 8 weeks to 48 hours"})," and cutting agency costs by up to ",l.jsx("strong",{children:"70%"}),". When a CMO or Head of Product needs to validate a new feature or market positioning, waiting months is a competitive liability. By leveraging Lexic Pulse's Active Engine to instantly interview hundreds of vetted panelists, companies validate their hypotheses over the weekend. This speed-to-insight prevents millions of dollars from being wasted on building unvalidated products."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Research cycles reduced from ",l.jsx("strong",{children:"8 weeks to 48 hours"}),"."]}),l.jsxs("li",{children:["Agency costs cut by up to ",l.jsx("strong",{children:"70%"})," with a SaaS model."]}),l.jsxs("li",{children:["Validates hypotheses ",l.jsx("strong",{children:"over the weekend"}),", preventing wasted capital."]})]})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"text-xl md:text-2xl font-light mb-6 leading-snug",children:"Information Gain: The Research Paradigm Shift"}),l.jsx("div",{className:"overflow-x-auto rounded-xl border border-indigo-200",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"bg-indigo-50/60",children:[l.jsx("th",{className:"text-left p-4 font-medium text-indigo-700",children:"Metric"}),l.jsx("th",{className:"text-left p-4 font-medium text-indigo-700",children:"Traditional Research (Focus Groups / Agency)"}),l.jsx("th",{className:"text-left p-4 font-medium text-indigo-700",children:"Lexic Pulse Active Engine"})]})}),l.jsxs("tbody",{className:"divide-y divide-indigo-100",children:[l.jsxs("tr",{children:[l.jsx("td",{className:"p-4 font-medium",children:"Speed to Insight"}),l.jsx("td",{className:"p-4 font-light",children:"6 to 8 weeks"}),l.jsx("td",{className:"p-4 font-light text-indigo-700",children:"Under 48 hours"})]}),l.jsxs("tr",{children:[l.jsx("td",{className:"p-4 font-medium",children:"Cost Profile"}),l.jsx("td",{className:"p-4 font-light",children:"$20,000 – $80,000+ per study"}),l.jsx("td",{className:"p-4 font-light text-indigo-700",children:"Up to 70% cheaper (SaaS model)"})]}),l.jsxs("tr",{children:[l.jsx("td",{className:"p-4 font-medium",children:"Insight Depth"}),l.jsx("td",{className:"p-4 font-light",children:"High, but limited to 8–10 people"}),l.jsx("td",{className:"p-4 font-light text-indigo-700",children:"High depth at massive scale (1,000+ people)"})]}),l.jsxs("tr",{children:[l.jsx("td",{className:"p-4 font-medium",children:"Response / Engagement Rate"}),l.jsx("td",{className:"p-4 font-light",children:"<8% (Surveys) / High drop-off"}),l.jsx("td",{className:"p-4 font-light text-indigo-700",children:"Up to 80% (Conversational UX via WhatsApp/Voice)"})]}),l.jsxs("tr",{children:[l.jsx("td",{className:"p-4 font-medium",children:"Bias Risk"}),l.jsx("td",{className:"p-4 font-light",children:'High ("Groupthink" and moderator bias)'}),l.jsx("td",{className:"p-4 font-light text-indigo-700",children:"Zero (Uninfluenced 1-on-1 parallel interviews)"})]})]})]})})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["To understand how these insights fit into a broader framework, read our full guide on"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["Explore the satellite articles in this hub:"," ",l.jsx(We,{to:"/the-signal/logic-adaptive-probing-ai-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Adaptive Probing"}),","," ",l.jsx(We,{to:"/the-signal/ai-interviews-vs-nps-response-rates",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI Interviews vs. NPS"}),","," ",l.jsx(We,{to:"/the-signal/scale-qualitative-insights-global-panel",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Global Panel Scale"}),", and"," ",l.jsx(We,{to:"/the-signal/data-privacy-ethics-ai-human-research",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Data Privacy & Ethics"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Rie={"@context":"https://schema.org","@type":"Article",headline:"The Logic of Adaptive Probing: How Lexic Pulse Agents Dig Deeper Than 'Yes/No' Answers",description:"Adaptive probing transforms rigid surveys into fluid AI interviews by using real-time NLP to formulate contextual follow-up questions that extract root causes.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/logic-adaptive-probing-ai-interviews"},Iie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Why do static surveys fail to capture root causes?",acceptedAnswer:{"@type":"Answer",text:'Static surveys fail because they are linear and presume the creator already knows all possible answers. They cannot ask "Why?" based on previous input, leaving the most valuable qualitative context undiscovered.'}},{"@type":"Question",name:"What is adaptive probing in AI interviews?",acceptedAnswer:{"@type":"Answer",text:"Adaptive probing is the real-time, dynamic generation of follow-up questions based on a respondent's unique conversational intent. The Lexic Pulse agent acts like an expert human researcher, recognizing lack of depth and probing deeper."}},{"@type":"Question",name:"How does Lexic Pulse recognize conversational intent?",acceptedAnswer:{"@type":"Answer",text:"Lexic Pulse leverages advanced LLMs tuned for market research and VoC. It analyzes semantic structure, sentiment, and completeness in milliseconds, generating empathetic follow-ups when the study objective has not been met."}}]},kie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Rie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Iie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"The Logic of Adaptive Probing in AI Interviews – Lexic Pulse",description:"How Lexic Pulse agents use adaptive probing and real-time NLP to dig deeper than Yes/No answers, extracting root emotional and operational causes.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"The Logic of Adaptive Probing: How Lexic Pulse Agents Dig Deeper Than 'Yes/No' Answers"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:["Adaptive probing is the AI mechanism that transforms a rigid survey into a fluid interview. When a respondent gives a vague or brief answer, Lexic Pulse's Active Engine uses real-time Natural Language Processing to instantly formulate a contextual follow-up question. This logic ensures the AI digs past surface-level symptoms to extract the ",l.jsx("strong",{children:"root emotional and operational causes"})," of a customer's behavior."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why do static surveys fail to capture root causes?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Static surveys fail to capture root causes because they are linear and presume the creator already knows all the possible answers. If a customer churns because of a highly specific, undocumented friction point in your billing portal, a multiple-choice survey will force them to click a generic ",l.jsx("strong",{children:'"Pricing"'})," or ",l.jsx("strong",{children:'"Other"'}),` box. Static forms cannot ask "Why?" based on the user's previous input, leaving the most valuable qualitative context completely undiscovered.`]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Static forms are ",l.jsx("strong",{children:"linear"})," and presume the creator knows all possible answers."]}),l.jsxs("li",{children:["Users are forced into ",l.jsx("strong",{children:"generic categories"})," that bury specific friction points."]}),l.jsxs("li",{children:["Cannot ask ",l.jsx("strong",{children:'"Why?"'})," based on previous input—root causes stay hidden."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is adaptive probing in AI interviews?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Adaptive probing in AI interviews is the real-time, dynamic generation of follow-up questions based on a respondent's unique conversational intent. Instead of following a strict script, the Lexic Pulse agent acts like an ",l.jsx("strong",{children:"expert human researcher"}),`. If a user states, "I didn't like the integration," the AI recognizes the lack of depth and adaptively probes: `,l.jsx("em",{children:'"I see. Were you trying to integrate with Salesforce or another CRM, and what specific error did you encounter?"'})]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Real-time dynamic generation"})," of follow-up questions based on unique conversational intent."]}),l.jsxs("li",{children:["Acts like an ",l.jsx("strong",{children:"expert human researcher"}),", not a rigid script executor."]}),l.jsx("li",{children:"Probes deeper when responses lack specificity or depth."})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does Lexic Pulse recognize conversational intent?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Lexic Pulse recognizes conversational intent by leveraging ",l.jsx("strong",{children:"advanced Large Language Models (LLMs)"}),` tuned specifically for market research and VoC (Voice of Customer). In milliseconds, the engine analyzes the semantic structure, sentiment, and completeness of a user's reply. It maps this against the core objective of the study (e.g., "Identify Churn Reasons"). If the objective has not been met, the AI intelligently generates a `,l.jsx("strong",{children:"frictionless, empathetic follow-up"})," to bridge the gap in understanding."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Leverages ",l.jsx("strong",{children:"LLMs tuned for market research"})," and Voice of Customer."]}),l.jsxs("li",{children:["Analyzes ",l.jsx("strong",{children:"semantic structure, sentiment, and completeness"})," in milliseconds."]}),l.jsxs("li",{children:["Generates ",l.jsx("strong",{children:"empathetic follow-ups"})," when the study objective has not been met."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["This article is part of the"," ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI-Moderated Qualitative Interviews"})," ","hub. To understand the broader framework, read"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Lie={"@context":"https://schema.org","@type":"Article",headline:"AI Interviews vs. Traditional NPS: Why 80% Response Rates are the New Standard",description:"Conversational AI interviews achieve up to 80% response rates by moving interactions to WhatsApp and using empathetic tone, far outperforming sub-10% NPS surveys.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/ai-interviews-vs-nps-response-rates"},Die={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Why is the average NPS response rate so low?",acceptedAnswer:{"@type":"Answer",text:"NPS response rates are critically low because consumers suffer from extreme survey fatigue. Every transaction triggers a multi-page form offering zero immediate value, so only the vocal minority responds, leaving data dangerously skewed."}},{"@type":"Question",name:"How does conversational AI achieve 80% response rates?",acceptedAnswer:{"@type":"Answer",text:"Conversational AI achieves 80% response rates by changing the medium and psychology of interaction. Reaching out via WhatsApp or voice lowers the barrier to entry. The AI asks a single relevant open-ended question and reacts empathetically, mimicking a natural chat."}},{"@type":"Question",name:"What is the business impact of a higher qualitative response rate?",acceptedAnswer:{"@type":"Answer",text:"Moving from 8% to 80% engagement eliminates Operational Blindness. You finally hear from the silent majority, unlocking the ability to detect systemic friction, predict churn, and validate roadmaps using statistically sound market representation."}}]},Fie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Lie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Die),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"AI Interviews vs. Traditional NPS: 80% Response Rates – Lexic Pulse",description:"Why conversational AI interviews achieve 80% response rates vs. sub-10% NPS surveys. The new standard for qualitative customer intelligence.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"AI Interviews vs. Traditional NPS: Why 80% Response Rates are the New Standard"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:["Traditional NPS surveys suffer from sub-10% response rates because they induce cognitive fatigue and feel like unrewarding administrative tasks. Conversational AI interviews achieve up to ",l.jsx("strong",{children:"80% response rates"})," by moving the interaction to native messaging apps like WhatsApp and using a conversational, empathetic tone. Users are far more willing to have a 2-minute chat than fill out a 15-question web form."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why is the average NPS response rate so low?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The average NPS response rate is critically low because modern B2B and B2C consumers suffer from ",l.jsx("strong",{children:"extreme survey fatigue"}),". Every transaction, ticket, and flight triggers a multi-page form. These forms offer zero immediate value to the user, feature poor mobile UX, and feel robotic. Consequently, only the vocal minority—your absolute angriest or happiest customers—bother to respond, leaving your data ",l.jsx("strong",{children:"dangerously skewed"}),"."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Consumers suffer from ",l.jsx("strong",{children:"extreme survey fatigue"})," across every touchpoint."]}),l.jsxs("li",{children:["Forms offer ",l.jsx("strong",{children:"zero immediate value"})," and feature poor mobile UX."]}),l.jsxs("li",{children:["Only the ",l.jsx("strong",{children:"vocal minority"})," responds, leaving data dangerously skewed."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does conversational AI achieve 80% response rates?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Conversational AI achieves 80% response rates by radically changing the ",l.jsx("strong",{children:"medium and the psychology"})," of the interaction. By reaching out via WhatsApp or voice—channels built for human connection—Lexic Pulse immediately lowers the barrier to entry. The AI introduces itself, asks a single, highly relevant open-ended question, and reacts empathetically to the answer. This mimics a ",l.jsx("strong",{children:"natural chat with a colleague"}),", making the respondent feel genuinely heard rather than interrogated."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Reaches out via ",l.jsx("strong",{children:"WhatsApp or voice"}),"—channels built for human connection."]}),l.jsxs("li",{children:["Asks a single, relevant question and ",l.jsx("strong",{children:"reacts empathetically"}),"."]}),l.jsxs("li",{children:["Mimics a ",l.jsx("strong",{children:"natural chat"}),", making respondents feel heard, not interrogated."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the business impact of a higher qualitative response rate?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The business impact of a higher qualitative response rate is the elimination of the ",l.jsx("strong",{children:'"Operational Blindness"'}),' that plagues C-suites. Moving from an 8% to an 80% engagement rate means you are finally hearing from the "silent majority." This unlocks the ability to detect systemic friction points, predict churn accurately, and validate product roadmaps using a ',l.jsx("strong",{children:"statistically sound representation"})," of your actual market, rather than just the loudest complainers."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Eliminates ",l.jsx("strong",{children:'"Operational Blindness"'})," plaguing C-suites."]}),l.jsxs("li",{children:["Finally hear from the ",l.jsx("strong",{children:'"silent majority"'})," of your customer base."]}),l.jsxs("li",{children:["Validate roadmaps with ",l.jsx("strong",{children:"statistically sound market representation"}),"."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["This article is part of the"," ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI-Moderated Qualitative Interviews"})," ","hub. To understand the broader framework, read"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),jie={"@context":"https://schema.org","@type":"Article",headline:"Reaching 4 Million Respondents: How to Scale Qualitative Insights Globally in 48 Hours",description:"Scale qualitative insights globally by deploying AI-moderated interviews to a verified panel of over 4 million respondents across multiple countries and languages in under 48 hours.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/scale-qualitative-insights-global-panel"},Oie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"What are the bottlenecks in global market research recruiting?",acceptedAnswer:{"@type":"Answer",text:"The bottlenecks are manual identification, vetting, and scheduling of qualified participants across time zones. Traditional agencies rely on fragmented databases and human screeners, a process that takes weeks and drives up costs."}},{"@type":"Question",name:"How does Lexic Pulse access 4 million verified panelists?",acceptedAnswer:{"@type":"Answer",text:"Lexic Pulse bypasses traditional recruiting by plugging its AI conversational engine directly into the world's largest vetted on-demand research panels, allowing instant audience definition with 150+ demographic filters."}},{"@type":"Question",name:"Can AI agents interview in multiple languages simultaneously?",acceptedAnswer:{"@type":"Answer",text:"Yes, Lexic Pulse's AI agents conduct qualitative interviews in up to 54 languages simultaneously with zero loss of nuance. The platform aggregates, translates, and synthesizes global data into one centralized English dashboard."}}]},Uie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(jie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Oie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Scale Qualitative Insights Globally: 4M+ Panel in 48 Hours – Lexic Pulse",description:"Reach 4 million verified respondents and deploy AI-moderated interviews across multiple countries and languages, delivering validated insights in under 48 hours.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Reaching 4 Million Respondents: How to Scale Qualitative Insights Globally in 48 Hours"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:["Scaling qualitative insights globally used to require months of complex agency coordination and massive recruiting budgets. Lexic Pulse integrates its Active Engine with a verified global panel of over ",l.jsx("strong",{children:"4 million respondents"}),". This allows businesses to define a hyper-specific B2B or B2C audience and deploy AI-moderated interviews simultaneously across multiple countries and languages, delivering validated market insights in ",l.jsx("strong",{children:"under 48 hours"}),"."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the bottlenecks in global market research recruiting?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The bottlenecks in global market research recruiting are the ",l.jsx("strong",{children:"manual identification, vetting, and scheduling"})," of qualified participants across different time zones. Traditional agencies rely on fragmented databases and human screeners, a process that inherently takes weeks. Furthermore, coordinating human moderators for international focus groups introduces massive logistical friction, driving up costs and delaying the strategic decisions that rely on this data."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Manual identification and vetting"})," of qualified participants across time zones."]}),l.jsxs("li",{children:["Fragmented databases and ",l.jsx("strong",{children:"human screeners"})," that take weeks."]}),l.jsxs("li",{children:["Massive ",l.jsx("strong",{children:"logistical friction"})," coordinating international focus groups."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does Lexic Pulse access 4 million verified panelists?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Lexic Pulse bypasses traditional recruiting by plugging its AI conversational engine directly into the world's ",l.jsx("strong",{children:"largest and most rigorously vetted on-demand research panels"}),". Through our platform, a CMO can instantly apply over ",l.jsx("strong",{children:"150 B2B and B2C demographic filters"}),'—such as "Supply Chain Directors in Germany" or "Gen Z eCommerce buyers in the UK." Once the audience is defined, the Active Engine instantly initiates outreach and conducts the interviews autonomously.']}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Plugs directly into ",l.jsx("strong",{children:"the world's largest vetted research panels"}),"."]}),l.jsxs("li",{children:["Over ",l.jsx("strong",{children:"150 demographic filters"})," for hyper-specific audience targeting."]}),l.jsxs("li",{children:["Active Engine ",l.jsx("strong",{children:"initiates outreach and interviews autonomously"}),"."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Can AI agents interview in multiple languages simultaneously?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Yes, Lexic Pulse's AI agents can conduct qualitative interviews in up to ",l.jsx("strong",{children:"54 languages simultaneously"}),", with zero loss of nuance or empathy. This natively multilingual capability means you can launch a single global validation study and the AI will dynamically converse with a respondent in Tokyo in Japanese, and a respondent in Madrid in Spanish. The platform then aggregates, translates, and synthesizes the global data into ",l.jsx("strong",{children:"one centralized English dashboard"})," instantly."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Interviews in up to ",l.jsx("strong",{children:"54 languages simultaneously"})," with zero nuance loss."]}),l.jsxs("li",{children:["Launch a ",l.jsx("strong",{children:"single global study"})," across multiple countries at once."]}),l.jsxs("li",{children:["All data synthesized into ",l.jsx("strong",{children:"one centralized English dashboard"}),"."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["This article is part of the"," ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI-Moderated Qualitative Interviews"})," ","hub. To understand the broader framework, read"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),zie={"@context":"https://schema.org","@type":"Article",headline:"Maintaining Intellectual Honesty and Data Privacy in AI-Driven Human Research",description:"Ethical AI research requires strict guardrails against leading the witness and full GDPR compliance. Lexic Pulse ensures neutral prompts, zero data resale, automatic PII redaction, and enterprise-grade encryption.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/data-privacy-ethics-ai-human-research"},Bie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"How do we ensure AI agents don't lead the witness?",acceptedAnswer:{"@type":"Answer",text:"Lexic Pulse builds strict systemic guardrails into prompt engineering. The AI is instructed to act as an objective researcher, asking open-ended follow-ups rather than closed, biased questions, maintaining intellectual honesty of the study."}},{"@type":"Question",name:"What are the GDPR and privacy implications of AI interviews?",acceptedAnswer:{"@type":"Answer",text:"Lexic Pulse is built with privacy-by-design. All data is hosted on secure EU-based servers with encryption at rest and in transit. The platform provides automated opt-out mechanisms for users at any point during the interaction."}},{"@type":"Question",name:"How does Lexic Pulse anonymize and secure qualitative data?",acceptedAnswer:{"@type":"Answer",text:"Automated PII scrubbing algorithms redact sensitive information before transcripts reach the dashboard. Lexic Pulse maintains a Zero Data Resale policy—proprietary customer conversations are never used to train third-party public LLMs."}}]},Vie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(zie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Bie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Data Privacy & Ethics in AI-Driven Human Research – Lexic Pulse",description:"How Lexic Pulse maintains intellectual honesty and GDPR compliance in AI-driven qualitative research with zero data resale and automatic PII redaction.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Maintaining Intellectual Honesty and Data Privacy in AI-Driven Human Research"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Definition"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:['Ethical AI research requires strict guardrails against "leading the witness" and absolute adherence to global data privacy laws. Lexic Pulse ensures intellectual honesty by constraining AI agents to neutral, exploratory prompts. Furthermore, the platform is fully ',l.jsx("strong",{children:"GDPR-compliant"}),", guaranteeing zero data resale, automatic ",l.jsx("strong",{children:"PII (Personally Identifiable Information) redaction"}),", and enterprise-grade encryption for all voice and text interactions."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How do we ensure AI agents don't lead the witness?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["To ensure AI agents don't lead the witness, Lexic Pulse builds ",l.jsx("strong",{children:"strict systemic guardrails"})," into the prompt engineering of our Active Engine. The AI is explicitly instructed to act as an objective researcher. It is programmed to ask open-ended follow-ups (e.g., ",l.jsx("em",{children:'"Can you elaborate on your experience?"'}),") rather than closed, biased questions (e.g., ",l.jsx("em",{children:'"Did you find the pricing too high?"'}),"). This maintains the ",l.jsx("strong",{children:"intellectual honesty"})," of the study and prevents the AI from hallucinating or forcing a desired outcome."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Strict systemic guardrails"})," built into prompt engineering."]}),l.jsxs("li",{children:["AI asks ",l.jsx("strong",{children:"open-ended follow-ups"}),", never closed or biased questions."]}),l.jsxs("li",{children:["Prevents hallucination and maintains ",l.jsx("strong",{children:"intellectual honesty"}),"."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the GDPR and privacy implications of AI interviews?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The GDPR and privacy implications of AI interviews are paramount; companies cannot trade compliance for speed. Lexic Pulse is built with ",l.jsx("strong",{children:"privacy-by-design"}),". All conversational data is hosted on secure, ",l.jsx("strong",{children:"EU-based servers"})," with encryption at rest and in transit. Interviews can be conducted under legitimate interest frameworks, and the platform provides clear, ",l.jsx("strong",{children:"automated opt-out mechanisms"})," for users at any point during the WhatsApp or voice interaction."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Built with ",l.jsx("strong",{children:"privacy-by-design"})," principles from the ground up."]}),l.jsxs("li",{children:["All data hosted on secure ",l.jsx("strong",{children:"EU-based servers"})," with full encryption."]}),l.jsxs("li",{children:["Clear, ",l.jsx("strong",{children:"automated opt-out mechanisms"})," at any point during interaction."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does Lexic Pulse anonymize and secure qualitative data?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Lexic Pulse anonymizes and secures qualitative data by deploying ",l.jsx("strong",{children:"automated PII scrubbing algorithms"})," the moment an interaction concludes. Before a transcript hits the strategic dashboard, sensitive information like names, credit card numbers, or addresses are redacted. Most importantly, Lexic Pulse maintains a ",l.jsx("strong",{children:'"Zero Data Resale" policy'}),"; your proprietary customer conversations are strictly ring-fenced and are never used to train third-party public LLMs."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Automated PII scrubbing"})," the moment an interaction concludes."]}),l.jsxs("li",{children:["Sensitive information ",l.jsx("strong",{children:"redacted before reaching"})," the dashboard."]}),l.jsxs("li",{children:[l.jsx("strong",{children:'"Zero Data Resale" policy'}),"—never used to train third-party LLMs."]})]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["This article is part of the"," ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI-Moderated Qualitative Interviews"})," ","hub. To understand the broader framework, read"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"The Operational Blindness Crisis"}),"."]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16})," Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Hie={"@context":"https://schema.org","@type":"Article",headline:"Top 10 AI Call Center Analytics Platforms for Enterprise Strategy (2026)",description:"AI Call Center Analytics uses artificial intelligence to audit 100% of customer interactions to extract actionable business insights. Compare NICE CXone, Genesys, Observe.AI, CallMiner, Dialpad, and Lexic Pulse.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/top-ai-call-center-analytics-platforms-2026"},Wie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Why are operational analytics no longer enough for enterprise call centers?",acceptedAnswer:{"@type":"Answer",text:'Operational analytics suffer from "Operational Blindness." Traditional platforms focus purely on internal efficiency metrics like AHT or script adherence, and manual QA teams audit only ~1% of call volume. Enterprises need an extrospective approach—analyzing the 99% of unmonitored calls to understand why the market is frustrated, not just how fast the agent hung up.'}},{"@type":"Question",name:"How do the top AI Call Center Analytics platforms compare in 2026?",acceptedAnswer:{"@type":"Answer",text:"The 2026 landscape divides between legacy operational systems (NICE CXone, Genesys Cloud CX, Observe.AI, CallMiner, Dialpad) and modern strategic intelligence layers like Lexic Pulse. Legacy tools optimise agent performance; Lexic Pulse democratises interaction data for C-Suite strategy and triggers active AI-moderated interviews to validate findings."}},{"@type":"Question",name:"What is the ROI of upgrading to a Total Customer Intelligence platform?",acceptedAnswer:{"@type":"Answer",text:'Lexic Pulse delivers immediate revenue protection by auditing 100% of passive interactions and replacing dead "Zombie Surveys" (2–5% response) with conversational AI agents achieving 35%+ completion rates. Leaders can validate qualitative market hypotheses in under 48 hours, shifting the call center from an expense into a strategic growth driver.'}}]},Gie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Hie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Wie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Top 10 AI Call Center Analytics Platforms (2026) – Lexic Pulse",description:"Compare NICE CXone, Genesys, Observe.AI, CallMiner, Dialpad and Lexic Pulse. Discover why Total Customer Intelligence outperforms legacy operational analytics.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Top 10 AI Call Center Analytics Platforms for Enterprise Strategy (2026)"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Quick Answer"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:"AI Call Center Analytics is the process of using artificial intelligence to audit 100% of customer interactions (voice, chat, email) to extract actionable business insights. In 2026, leading platforms have shifted from purely operational quality assurance (QA) to strategic intelligence, identifying root causes of churn and validating market hypotheses in real time rather than relying on delayed 1% manual sampling."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why are operational analytics no longer enough for enterprise call centers?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:['Operational analytics are no longer enough because they suffer from "',l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Operational Blindness"}),'." Traditional platforms are introspective: they focus purely on internal efficiency metrics like Average Handle Time (AHT) or whether an agent followed a script. Furthermore, manual QA teams can only audit roughly 1% of total call volume.']}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["When the C-suite relies on operational analytics, they treat the call center as a cost center rather than a revenue-protection engine. To scale, enterprises need an extrospective approach: analyzing the 99% of unmonitored calls to understand ",l.jsx("em",{children:"why"})," the market is frustrated, not just how fast the agent hung up the phone."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How do the top AI Call Center Analytics platforms compare in 2026?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-8",children:"The 2026 landscape is divided between legacy operational systems and modern strategic intelligence layers. Here is how the top competitors stack up against the demand for Total Customer Intelligence:"}),[{name:"NICE CXone",desc:"Positioned as the incumbent leader for regulated industries, NICE offers deep compliance analytics.",gap:"It has a notoriously steep learning curve and keeps data siloed within support teams.",checkmate:"While NICE optimizes your contact center, Lexic Pulse democratizes the data. Lexic translates a support trend directly into a product roadmap insight for the C-Suite in real time."},{name:"Genesys Cloud CX",desc:"Highly noted for customer journey orchestration and flexible routing.",gap:"Genesys is an operational operating system focused on agent efficiency, but its reporting can lack granular business intelligence.",checkmate:"Genesys tells you a customer is angry and routes the call; Lexic Pulse tells you they are angry about a specific competitor's new feature, and instantly triggers our Active Engine to interview 500 similar customers to validate a counter-offer."},{name:"Observe.AI",desc:"A strong contender with a heavy focus on Quality Assurance (QA) automation and high accuracy in speech recognition.",gap:"QA is now table stakes. Observe.AI stops at grading the agent's performance.",checkmate:"Lexic Pulse doesn't just grade the agent; it grades the market. We use passive listening to find friction, then deploy our Double Helix active engine to ask customers how to fix it."},{name:"CallMiner",desc:"The veteran choice for compliance-heavy environments and rigorous speech analytics.",gap:"It is a heavy, passive-only system that requires significant manual configuration to track new business trends.",checkmate:"CallMiner tells you what happened in the past. Lexic Pulse's generative AI automatically detects emerging themes without manual keyword programming, achieving 100% audit coverage out-of-the-box."},{name:"Dialpad",desc:"Suited for mid-market teams needing a unified, user-friendly communication system with built-in transcription.",gap:"It is fundamentally a telephony system with AI bolted on, lacking the depth for enterprise-wide strategic pivots.",checkmate:"Lexic Pulse is an intelligence layer that sits above your telephony. We provide comprehensive ecosystem intelligence, unconstrained by which phone system your sales or support teams use."}].map(t=>l.jsxs("div",{className:"mb-10 pl-4 border-l-2 border-indigo-200",children:[l.jsx("h3",{className:"text-xl font-medium mb-2",children:t.name}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-3",children:t.desc}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-2",children:[l.jsx("strong",{className:"text-red-600",children:"Strategic Gap:"})," ",t.gap]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:[l.jsx("strong",{className:"text-indigo-600",children:"Lexic Pulse Checkmate:"})," ",t.checkmate]})]},t.name))]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the ROI of upgrading to a Total Customer Intelligence platform?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The ROI of upgrading to a Total Customer Intelligence platform like ",l.jsx("strong",{children:"Lexic Pulse"}),' is measured in immediate revenue protection and accelerated time-to-market. By auditing 100% of passive interactions, companies eliminate the compliance liability of the "1% Myth."']}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["More importantly, Lexic Pulse's ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Active Engine"}),' replaces dead "Zombie Surveys" (which average a 2–5% response rate) with conversational AI agents that achieve 35%+ completion rates. This allows leaders to validate qualitative market hypotheses in under 48 hours, fundamentally shifting the call center from an operational expense into a strategic growth driver.']})]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),qie={"@context":"https://schema.org","@type":"Article",headline:"Lexic Pulse vs. Gong: Why Conversation Intelligence is Outpacing Revenue Intelligence",description:"Revenue Intelligence analyses sales rep performance from CRM data. Modern Conversation Intelligence goes further—capturing omnichannel sentiment and uncovering root causes of stalled deals automatically.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2026-03-01",mainEntityOfPage:"https://lexic.ai/the-signal/lexic-pulse-vs-gong-conversation-intelligence"},Xie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Why is traditional Revenue Intelligence failing modern sales teams?",acceptedAnswer:{"@type":"Answer",text:"Traditional Revenue Intelligence relies on 2017-era keyword tracker technology requiring 40+ hours of monthly RevOps maintenance and 50–100 training examples per tracker. When the market shifts or buyers use nuanced language, rigid trackers fail to capture context, leaving CROs with blind spots as deals go dark."}},{"@type":"Question",name:"How does Lexic Pulse deal-level analysis differ from Gong meeting-level analysis?",acceptedAnswer:{"@type":"Answer",text:"Gong is introspective—it grades whether a rep talked too much or missed a talk track. Lexic Pulse is extrospective—it uses Generative AI to understand why the market rejects your value proposition, analysing intent across emails, calls, and support tickets over the entire lifecycle, then deploying Active Engine WhatsApp interviews to recover lost deals."}},{"@type":"Question",name:"What is the cost of maintaining legacy Revenue Intelligence platforms?",acceptedAnswer:{"@type":"Answer",text:"Up to 40% of Gong users stack secondary forecasting tools like Clari, driving true cost to $410–$550 per user/month. Administrative friction of updating keyword trackers means insights lag weeks behind market reality. Lexic Pulse eliminates this with autonomous generative AI that adapts instantly, reducing analysis time by 90%."}},{"@type":"Question",name:"How does the Double Helix model accelerate pipeline velocity?",acceptedAnswer:{"@type":"Answer",text:"The Double Helix combines passive pipeline auditing with active deal validation. When the passive engine detects deals stalling at the proposal stage, the active engine deploys AI agents to interview stalled prospects. Within 48 hours, CROs receive a board-ready report explaining exact market friction, transforming a static CRM into an agile revenue recovery system."}}]},$ie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(qie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Xie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Lexic Pulse vs. Gong: Conversation Intelligence vs Revenue Intelligence",description:"Why Conversation Intelligence is outpacing Revenue Intelligence. Compare Lexic Pulse and Gong across deal analysis, cost, and pipeline acceleration.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Lexic Pulse vs. Gong: Why Conversation Intelligence is Outpacing Revenue Intelligence"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Quick Answer"}),l.jsx("p",{className:"text-base md:text-lg leading-relaxed font-light",children:"Revenue Intelligence focuses on analyzing sales rep performance and forecasting deals based on historical CRM data. In contrast, modern Conversation Intelligence goes further by capturing omnichannel customer sentiment across the entire lifecycle. By using generative AI, Conversation Intelligence uncovers the root causes of stalled deals and market shifts automatically, without the heavy manual keyword tracking required by legacy revenue tools."})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why is traditional Revenue Intelligence failing modern sales teams?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:['Traditional Revenue Intelligence is failing modern sales teams because it relies on outdated, 2017-era keyword tracker technology. Platforms built in this era require sales operations teams to manually program specific keywords (e.g., "competitor X" or "pricing objection") to track trends. This requires upwards of ',l.jsx("strong",{children:"40+ hours of monthly RevOps maintenance"}),' and 50 to 100 training examples just to set up a single "Smart Tracker."']}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["When the market shifts unexpectedly or a buyer uses nuanced language, these rigid trackers fail to capture the context, leaving CROs with blind spots right as deals go dark. This is an extension of the broader ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Operational Blindness Crisis"})," that plagues legacy B2B intelligence."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does Lexic Pulse's deal-level analysis differ from Gong's meeting-level analysis?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-6",children:"Lexic Pulse's deal-level analysis focuses on the holistic buying intent of the market, whereas Gong focuses heavily on the isolated mechanics of the meeting."}),l.jsxs("div",{className:"mb-8 pl-4 border-l-2 border-indigo-200",children:[l.jsx("h3",{className:"text-xl font-medium mb-2",children:"The Meeting vs. The Market"}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["Gong is highly introspective; it tells you if a rep talked too much, interrupted the prospect, or missed a prescribed talk track. ",l.jsx("strong",{children:"Lexic Pulse"})," is extrospective; it uses Generative AI to understand ",l.jsx("em",{children:"why"})," the market is rejecting your value proposition, analyzing nuanced intent across emails, calls, and support tickets over the entire lifecycle."]})]}),l.jsx("div",{className:"pl-4 border-l-2 border-indigo-200",children:l.jsxs("p",{className:"text-base leading-relaxed font-light",children:[l.jsx("strong",{className:"text-indigo-600",children:"Lexic Pulse Checkmate:"})," Gong tells you that your rep missed a cue during the demo. Lexic Pulse's Passive Engine automatically surfaces the hidden pricing objection your competitor planted. If the deal still stalls, Lexic's Active Engine can seamlessly deploy an AI-moderated WhatsApp interview to the lost prospect, achieving an ",l.jsx("strong",{children:"80% response rate"})," to uncover exactly what offer would bring them back to the table."]})})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the cost of maintaining legacy Revenue Intelligence platforms?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The cost of maintaining legacy Revenue Intelligence platforms extends far beyond their licensing fees—it drains internal resources and delays strategic action. Tools like Gong force up to ",l.jsx("strong",{children:"40% of their users"})," to stack secondary forecasting tools (like Clari) to get a complete picture, driving the true cost up to ",l.jsx("strong",{children:"$410–$550 per user, per month"}),"."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["Furthermore, the administrative friction of constantly updating keyword trackers means insights are always weeks behind the market reality. ",l.jsx("strong",{children:"Lexic Pulse"})," eliminates this friction entirely with autonomous, out-of-the-box generative AI that adapts to conversational context instantly, reducing analysis time by 90%."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:'How does the "Double Helix" model accelerate pipeline velocity?'}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:['The "Double Helix" model accelerates pipeline velocity by combining passive pipeline auditing with active deal validation. Traditional tools stop at passive listening: they record the lost deal and store it in the CRM. ',l.jsx("strong",{children:"Lexic Pulse"})," closes the loop."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["If our passive engine detects a spike in deals stalling at the proposal stage, our active engine can instantly deploy natural-language AI agents to interview a segment of those stalled prospects. Within ",l.jsx("strong",{children:"48 hours"}),", CROs receive a statistically validated board-ready report explaining the exact market friction, transforming a static CRM graveyard into an agile revenue recovery system."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["Learn more about how this works in our deep dive on ",l.jsx(We,{to:"/the-signal/automatic-deal-loss-attribution-ai",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Automatic Deal Loss Attribution"}),"."]})]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Yie={"@context":"https://schema.org","@type":"Article",headline:"Best AI Tools for Customer Interviews 2025: Lexic Pulse vs. Outset vs. Marvin",description:"AI-powered customer interview tools in 2025 fall into three categories: Active AI Interviewers, Unmoderated Video tools, and Research Repositories. Compare Lexic Pulse, Outset.ai, and Marvin.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2025-12-29",mainEntityOfPage:"https://lexic.ai/the-signal/best-ai-tools-customer-interviews-2025"},Qie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"What are the three categories of AI customer interview tools in 2025?",acceptedAnswer:{"@type":"Answer",text:"AI customer interview tools in 2025 fall into three distinct categories: Active AI Interviewers that autonomously recruit and conduct interviews (like Lexic Pulse), Unmoderated Video tools for UX prototype testing (like Outset.ai), and Research Repositories for organizing human-led interviews (like Marvin). The choice depends on whether you need to generate new insights at scale or organize existing ones."}},{"@type":"Question",name:"How does Lexic Pulse compare to Outset.ai and Marvin?",acceptedAnswer:{"@type":"Answer",text:"Lexic Pulse is the only platform combining autonomous AI interviewing with integrated access to a 6M+ global participant panel, conducting adaptive phone and WhatsApp interviews at scale. Outset.ai specialises in AI-moderated video surveys for UX prototype testing but requires external recruitment. Marvin acts as a research repository for human-led interviews but does not scale data collection."}},{"@type":"Question",name:"Which AI tool should you choose for customer research?",acceptedAnswer:{"@type":"Answer",text:"Choose Lexic Pulse if you need to replace slow, expensive market research with autonomous AI interviews reaching thousands of participants in 48 hours. Choose Outset.ai if you are a UX researcher needing visual prototype reactions via webcam. Choose Marvin if you have a dedicated team of human researchers and need a central repository to store, tag, and search past interview data."}}]},Kie=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Yie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Qie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Best AI Tools for Customer Interviews 2025 – Lexic Pulse vs. Outset vs. Marvin",description:"Compare Lexic Pulse, Outset.ai, and Marvin. Discover which AI customer interview tool is best for active research, UX testing, or organising human-led interviews.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Best AI Tools for Customer Interviews 2025: Lexic Pulse vs. Outset vs. Marvin"})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Quick Answer"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:["AI-powered customer interview tools in 2025 fall into three categories: ",l.jsx("strong",{children:"Active AI Interviewers"})," that recruit and conduct interviews autonomously, ",l.jsx("strong",{children:"Unmoderated Video"})," tools for UX prototype testing, and ",l.jsx("strong",{children:"Research Repositories"})," for organizing human-led interviews. ",l.jsx("strong",{children:"Lexic Pulse"})," leads the Active category as the only platform combining autonomous AI interviewing with integrated access to a 6M+ global participant panel."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What are the three categories of AI customer interview tools in 2025?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:'The era of waiting 8 weeks and spending $50k for a focus group is over. The "User Research" category has split into three distinct paths, each solving a different bottleneck in the customer intelligence pipeline:'}),l.jsxs("ul",{className:"list-disc pl-6 space-y-3 text-base leading-relaxed font-light mb-4",children:[l.jsxs("li",{children:[l.jsx("strong",{children:"Active AI Interviewers"})," — Platforms that autonomously recruit participants and conduct adaptive two-way conversations at scale, replacing the traditional research agency model entirely."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Unmoderated Video Tools"})," — Specialised for UX and product design teams needing to see visual reactions to prototypes via webcam-based sessions."]}),l.jsxs("li",{children:[l.jsx("strong",{children:"Research Repositories"})," — Systems that organize, transcribe, and search interviews conducted by human researchers, acting as a central library rather than a data collection engine."]})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:['Understanding which category matches your strategic need is the first step. The second is understanding the "',l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Operational Blindness"}),'" each tool can—or cannot—solve.']})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does Lexic Pulse compare to Outset.ai and Marvin?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-8",children:"Each platform addresses a fundamentally different research bottleneck. Here is how the three leaders compare when measured against the demand for scalable, autonomous customer intelligence:"}),[{name:"Lexic Pulse — The Active Market Research Replacement",desc:"Lexic Pulse is not just a tool; it is an autonomous research agent. It solves the two hardest parts of research simultaneously: Recruiting and Interviewing. With integrated access to a vetted panel of 6M+ participants (B2B & B2C) across 150+ demographic filters, Lexic Pulse conducts 15–20 minute adaptive interviews via phone call, WhatsApp, and web—yielding significantly higher response rates than email-based alternatives.",gap:"No strategic gap. Lexic Pulse is the benchmark in the Active AI Interviewer category, combining recruitment, multichannel outreach, and depth-at-scale in a single platform.",checkmate:'Launch a study to 500 "HR Managers in the UK" and receive structured insights in 48 hours—without an external agency, without participant downloads, and at a fraction of the cost.',isLexic:!0},{name:"Outset.ai — The Visual UX Specialist",desc:"Outset focuses on the visual aspect of research. It uses AI to conduct video-based interviews where participants respond via webcam, making it effective for concept testing where seeing the user's face or screen interaction is critical.",gap:"Recruitment friction remains a bottleneck—you generally need to bring your own users or integrate a separate panel. Device friction (camera + willingness to record) lowers participation rates compared to voice or chat channels.",checkmate:"Lexic Pulse eliminates recruitment friction entirely with its integrated 6M+ panel and engages users where they already are—on their phone. No app downloads, no webcams, no scheduling conflicts."},{name:"Marvin (HeyMarvin) — The Research Repository",desc:"Marvin differs fundamentally: it doesn't conduct interviews for you. It records, transcribes, and organizes meetings from Zoom, Teams, or Google Meet, acting as a central source of truth for research data accumulated over time.",gap:"It is not a scalability tool. If you need 500 interviews, you still need humans to conduct them. It organizes data you already have but doesn't actively hunt for new market insights.",checkmate:"Lexic Pulse's Active Engine replaces the need for human interviewers entirely. Instead of storing past conversations, it generates new intelligence autonomously—conducting unlimited concurrent interviews via the Double Helix model of passive audits and active AI-moderated research."}].map(t=>l.jsxs("div",{className:"mb-10 pl-4 border-l-2 border-indigo-200",children:[l.jsx("h3",{className:"text-xl font-medium mb-2",children:t.name}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-3",children:t.desc}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-2",children:[l.jsx("strong",{className:t.isLexic?"text-green-600":"text-red-600",children:t.isLexic?"Strategic Advantage:":"Strategic Gap:"})," ",t.gap]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:[l.jsx("strong",{className:"text-indigo-600",children:"Lexic Pulse Checkmate:"})," ",t.checkmate]})]},t.name)),l.jsxs("div",{className:"mt-12",children:[l.jsx("h3",{className:"text-xl font-medium mb-4",children:"Comparison Table: Features & Capabilities"}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-sm border border-indigo-100 rounded-lg overflow-hidden",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"bg-indigo-50 text-left",children:[l.jsx("th",{className:"p-3 font-medium",children:"Feature"}),l.jsx("th",{className:"p-3 font-medium",children:"Lexic Pulse"}),l.jsx("th",{className:"p-3 font-medium",children:"Outset.ai"}),l.jsx("th",{className:"p-3 font-medium",children:"Marvin"})]})}),l.jsx("tbody",{className:"divide-y divide-indigo-50",children:[["Primary Category","Active AI Interviewer & Recruiter","AI-Moderated Video Surveys","Research Repository & Assistant"],["Recruitment","Integrated (6M+ Panel)","External / Integrations","External (BYO Users)"],["Primary Channels","Phone Call, WhatsApp, Web","Web-based Video","Zoom, Teams, G-Meet"],["Best Use Case","Market Research, CX, Churn Analysis","UX Testing, Prototype Feedback","Storing & Analyzing Human Interviews"],["Scalability","High (Unlimited concurrent)","High (Asynchronous video)","Low (Human-dependent)"],["Setup Speed","< 24 Hours","Days (recruitment dependent)","N/A (Repository tool)"]].map(t=>l.jsxs("tr",{children:[l.jsx("td",{className:"p-3 font-medium",children:t[0]}),l.jsx("td",{className:"p-3 font-light",children:t[1]}),l.jsx("td",{className:"p-3 font-light",children:t[2]}),l.jsx("td",{className:"p-3 font-light",children:t[3]})]},t[0]))})]})})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Which AI tool should you choose for customer research?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The decision comes down to whether you need to ",l.jsx("em",{children:"generate"})," new insights or ",l.jsx("em",{children:"organize"})," existing ones."]}),l.jsxs("div",{className:"space-y-4 mb-6",children:[l.jsx("div",{className:"pl-4 border-l-2 border-gray-200",children:l.jsxs("p",{className:"text-base leading-relaxed font-light",children:[l.jsx("strong",{children:"Choose Marvin"})," if you have a dedicated team of human researchers conducting high-touch interviews and need a place to store, tag, and search that data."]})}),l.jsx("div",{className:"pl-4 border-l-2 border-gray-200",children:l.jsxs("p",{className:"text-base leading-relaxed font-light",children:[l.jsx("strong",{children:"Choose Outset"})," if you are a Product Designer specifically needing to see a user's face while they interact with a Figma prototype."]})}),l.jsx("div",{className:"pl-4 border-l-2 border-indigo-400",children:l.jsxs("p",{className:"text-base leading-relaxed font-light",children:[l.jsx("strong",{children:"Choose Lexic Pulse"}),' if you are a CMO, Head of CX, or Product Leader who needs to replace slow, expensive market research. If your goal is to "download" the opinions of 1,000 specific professionals or consumers into a dashboard over the weekend—without hiring a recruiting agency or spending weeks coordinating schedules—Lexic Pulse is the superior strategic choice.']})})]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["For a deeper understanding of how ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI-Moderated Qualitative Interviews"})," are replacing traditional focus groups, explore the full pillar guide."]})]}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),Zie={"@context":"https://schema.org","@type":"Article",headline:"Beyond the Hype: What 100 C-Levels Confessed to Our AI About Real GenAI Usage",description:"A massive qualitative analysis: +400 minutes of AI-moderated conversation reveal the operational truth of Spanish enterprise GenAI adoption. Discover 4 critical findings about trust, Shadow AI, and the executive use paradox.",author:{"@type":"Organization",name:"Lexic AI"},publisher:{"@type":"Organization",name:"Lexic AI",url:"https://lexic.ai"},datePublished:"2025-12-12",mainEntityOfPage:"https://lexic.ai/the-signal/c-level-ai-study"},Jie={"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"What did 100 C-Level executives reveal about real GenAI usage in enterprise?",acceptedAnswer:{"@type":"Answer",text:'The Lexic Pulse C-Level AI Study—based on +400 minutes of AI-moderated interviews with 100 Spanish enterprise executives—revealed four critical findings: a Trust Crisis where executives treat AI as an "unreliable junior assistant", widespread Shadow AI adoption using personal accounts for public tools like ChatGPT, a Cognitive Tension between speed and deep strategic thinking, and an Executive Use Paradox where C-Suite leaders use the most powerful technology of the century almost exclusively for low-level administrative tasks.'}},{"@type":"Question",name:"What is Shadow AI and why is it a risk for enterprises?",acceptedAnswer:{"@type":"Answer",text:"Shadow AI refers to the unauthorised use of non-corporate AI tools (such as ChatGPT or Gemini with personal accounts) by employees, including C-Level executives. The Lexic Pulse study found this has become the operational norm in Spanish enterprise, driven not by rebellion but by the absence of agile internal alternatives. The risk includes intellectual property leakage, confidential data exposure, and GDPR compliance violations when sensitive business information is input into public models."}},{"@type":"Question",name:"How does AI-moderated interviewing differ from traditional executive surveys?",acceptedAnswer:{"@type":"Answer",text:"AI-moderated interviewing—as pioneered by Lexic Pulse—replaces cold surveys with deep, empathetic, anonymous conversations conducted by trained AI models. This methodology achieved 100% completion rates across 100 C-Level executives, generating +400 minutes of rich qualitative data. Traditional surveys typically achieve 5–8% response rates with shallow, closed-ended answers. The AI interviewer adapts in real time, probing deeper into contradictions and emotional cues that static questionnaires structurally cannot capture."}},{"@type":"Question",name:"What is the Executive Use Paradox in GenAI adoption?",acceptedAnswer:{"@type":"Answer",text:'The Executive Use Paradox, identified in the Lexic Pulse C-Level AI Study, describes the gap between the strategic potential of GenAI and its actual usage by C-Suite leaders. Despite holding positions of maximum responsibility, executives use AI almost exclusively for low-level administrative tasks: drafting emails to "improve tone", meeting summaries, and overcoming the "blank page". They struggle to find use cases for strategic decision-making, negotiation, or people management—effectively using the most powerful technology of the century for secretarial work.'}}]},ere=()=>(I.useEffect(()=>{const t=document.createElement("script");t.type="application/ld+json",t.textContent=JSON.stringify(Zie),document.head.appendChild(t);const e=document.createElement("script");return e.type="application/ld+json",e.textContent=JSON.stringify(Jie),document.head.appendChild(e),()=>{document.head.removeChild(t),document.head.removeChild(e)}},[]),l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"C-Level AI Study: What 100 Executives Confessed – Lexic Pulse",description:"A massive qualitative analysis: +400 minutes of AI-moderated conversation reveal the operational truth of Spanish enterprise GenAI adoption. 4 critical findings on trust, Shadow AI, and the executive use paradox.",ogImage:"https://lexic.ai/images/og-image.png"}),l.jsx(un,{}),l.jsxs("main",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx("section",{className:"relative pt-32 pb-20 px-6 md:px-12",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm mb-8 transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight",children:"Beyond the Hype: What 100 C-Levels Confessed to Our AI About Real GenAI Usage"}),l.jsx("div",{className:"flex flex-wrap gap-8 mt-10",children:[{value:"100",label:"C-Level Executives"},{value:"+400",label:"Minutes Analysed"},{value:"100%",label:"Anonymity"}].map(t=>l.jsxs("div",{className:"text-center",children:[l.jsx("div",{className:"text-3xl font-light text-white",children:t.value}),l.jsx("p",{className:"text-white/50 text-xs mt-1 uppercase tracking-wider",children:t.label})]},t.label))})]})}),l.jsx("section",{className:"bg-white py-16 px-6 md:px-12",children:l.jsxs("article",{className:"max-w-3xl mx-auto space-y-14 text-[#150835]",children:[l.jsxs("div",{id:"aio-answer-capsule",className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-[0.3em] text-indigo-500 mb-3",children:"Study Summary"}),l.jsxs("p",{className:"text-base md:text-lg leading-relaxed font-light",children:["The ",l.jsx("strong",{children:"Lexic Pulse"}),' C-Level AI Study is a pioneering qualitative analysis where an AI interviewer conducted deep, anonymous conversations with 100 Spanish enterprise executives, generating over 400 minutes of unfiltered dialogue. The study reveals four critical findings: a pervasive Trust Crisis where leaders treat GenAI as an "unreliable junior assistant", widespread Shadow AI adoption driven by the absence of corporate alternatives, a Cognitive Tension between AI-generated speed and the depth of strategic thinking, and an Executive Use Paradox where C-Suite leaders confine the most powerful technology of the century to secretarial tasks.']})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How was the C-Level AI study conducted using AI-moderated interviews?"}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:'If you read press headlines, Spanish enterprise is in full "AI revolution". If you read the PowerPoints from Board Committees, everything is under control. But if you sit down and talk, one-on-one, with the executives who have to execute that vision, the reality is drastically different.'}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["At C-Level Studio, powered by ",l.jsx("strong",{children:"Lexic Pulse"}),", we designed a pioneering experiment: an ",l.jsx("strong",{children:"AI interviewer"})," trained to maintain deep, empathetic, and anonymous conversations with business leaders. No cold surveys. No check-boxes. Just open, honest dialogue with guaranteed anonymity—the key ingredient that unlocked candour at the C-Suite level."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light",children:["What the AI discovered was not a smooth strategic adoption, but a landscape of ",l.jsx("strong",{children:'"guerrilla adoption"'}),", pragmatic scepticism, and a functional paradox. Here are the four critical conclusions backed by the data."]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the Trust Crisis in enterprise GenAI adoption?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The most striking finding is emotional: ",l.jsx("strong",{children:"executives don't trust the technology they use daily"}),'. Unlike the "Expert Copilot" narrative promoted by vendors, the predominant mental model uncovered by ',l.jsx("strong",{children:"Lexic Pulse"}),' is that of an "unreliable Junior Assistant"—a digital intern whose every output must be checked.']}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:`Distrust is the most cited barrier across all 100 interviews. Phrases like "I don't take anything for granted" or "I always review everything" are the operational norm, not the exception.`}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Time gained in draft generation is almost entirely lost in ",l.jsx("strong",{children:"verification overhead"}),", especially for legal citations or financial data."]}),l.jsx("li",{children:'The need for "constant human supervision" prevents delegating high-value tasks to AI.'}),l.jsxs("li",{children:["This generates a ",l.jsx("strong",{children:"hidden negative ROI"})," that most digital transformation dashboards fail to capture."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"Why has Shadow AI become the operational norm in enterprise?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Perhaps the most alarming data for IT and Legal departments: ",l.jsx("strong",{children:"the use of non-corporate AI tools has become the standard practice"})," among C-Level executives. Faced with a lack of agile internal tools, leaders have massively adopted public solutions—ChatGPT, Gemini—using personal accounts."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["The ",l.jsx("strong",{children:"Lexic Pulse"})," interviews reveal that this isn't rebellion; it's ",l.jsx("strong",{children:'"Survival Shadow AI"'})," born from the absence of corporate alternatives that match the speed and convenience of consumer-grade tools."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Executives explicitly acknowledge the risk of ",l.jsx("strong",{children:"intellectual property leakage"})," when inputting confidential data into public models."]}),l.jsx("li",{children:"Shadow AI creates invisible GDPR and compliance exposure that governance frameworks cannot detect."}),l.jsxs("li",{children:["The solution isn't prohibition—it's providing ",l.jsx("strong",{children:"secure, corporate-grade AI environments"})," that match the convenience of consumer tools."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"How does GenAI create cognitive tension between speed and strategic depth?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["For the first time, the ",l.jsx("strong",{children:"Lexic Pulse"})," study detected ",l.jsx("strong",{children:"a palpable nostalgia for the pre-AI era"})," among C-Level leaders. There is a clear tension between the efficiency gains of AI-generated content and the quality of executive thinking."]}),l.jsx("p",{className:"text-base leading-relaxed font-light mb-4",children:`Executives perceive that AI's speed comes at the cost of deep reflection and team debate. They lament the loss of the "social component" and incidental learning that arose from human collaboration—now replaced by solitary queries to the machine.`}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Leaders fear this will ",l.jsx("strong",{children:"erode the quality of long-term strategic decisions"}),"."]}),l.jsx("li",{children:"The speed-versus-depth trade-off is invisible to productivity dashboards."}),l.jsxs("li",{children:["Organisations need frameworks that preserve ",l.jsx("strong",{children:"deliberate strategic thinking"})," while leveraging AI efficiency."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What is the Executive Use Paradox in C-Suite GenAI adoption?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Here lies the most revealing data about current maturity. Although interviewees hold positions of maximum responsibility, ",l.jsx("strong",{children:"they use AI almost exclusively for low-level administrative tasks"}),"—underutilising its strategic potential."]}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["Conversation analysis by ",l.jsx("strong",{children:"Lexic Pulse"}),' shows that usage is concentrated on drafting emails to "improve tone", meeting summaries, and overcoming the "blank page". In other words, ',l.jsx("strong",{children:"they use the most powerful technology of the century for secretarial tasks"}),"."]}),l.jsxs("ul",{className:"list-disc list-inside space-y-2 text-base font-light leading-relaxed pl-2",children:[l.jsxs("li",{children:["Executives struggle to find use cases for ",l.jsx("strong",{children:"strategic decision-making"})," or people management."]}),l.jsx("li",{children:"They perceive AI as foreign to the core of their executive work: negotiation, leadership, and stakeholder management."}),l.jsxs("li",{children:["Closing this ",l.jsx("strong",{children:"applicability gap"})," requires purpose-built pilots for risk modelling, scenario planning, and competitive intelligence."]})]})]}),l.jsxs("section",{children:[l.jsx("h2",{className:"text-2xl md:text-3xl font-light mb-6 leading-snug",children:"What strategic recommendations emerge from the C-Level AI study?"}),l.jsxs("p",{className:"text-base leading-relaxed font-light mb-6",children:["The study reveals that the average organisation is in a phase of ",l.jsx("strong",{children:'"Reactive Digital Maturity"'}),"—adoption is organic but ungoverned. To move to the next level, the data-based recommendations are clear:"]}),l.jsx("div",{className:"space-y-4",children:[{num:"1",title:"Deploy a Corporate AI Sandbox",desc:"Centralise usage in a secure environment to mitigate Shadow AI risk. Give executives corporate-grade tools that match the convenience of ChatGPT—eliminating the incentive for personal-account workarounds."},{num:"2",title:"Invest in Critical Thinking Training",desc:'Teach executives to validate and audit AI outputs, not just write prompts. Shift the culture from blind consumption to informed oversight—transforming the "unreliable intern" into a supervised analyst.'},{num:"3",title:"Develop Executive Use Cases",desc:"It is urgent to develop pilots that apply AI to strategic challenges—risk modelling, competitive scenarios, talent analytics—to close the applicability gap at the C-Suite level."}].map(t=>l.jsxs("div",{className:"flex items-start gap-4 p-5 bg-indigo-50/60 rounded-xl",children:[l.jsx("span",{className:"flex-shrink-0 w-8 h-8 bg-[#240AFF] text-white rounded-full flex items-center justify-center font-medium text-sm",children:t.num}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-medium text-[#150835] mb-1",children:t.title}),l.jsx("p",{className:"text-sm leading-relaxed font-light text-[#150835]/70",children:t.desc})]})]},t.num))})]}),l.jsx("section",{className:"rounded-xl border border-indigo-200 bg-indigo-50/40 p-6 md:p-8",children:l.jsxs("p",{className:"text-base leading-relaxed font-light mb-4",children:["This study was conducted using ",l.jsx("strong",{children:"Lexic Pulse"})," AI-moderated interviewing technology—the same platform that powers"," ",l.jsx(We,{to:"/the-signal/operational-blindness-crisis",className:"text-indigo-600 hover:text-indigo-800 underline",children:"Total Customer Intelligence"})," ","and"," ",l.jsx(We,{to:"/the-signal/ai-moderated-qualitative-interviews",className:"text-indigo-600 hover:text-indigo-800 underline",children:"AI-Moderated Qualitative Interviews"})," ","at enterprise scale."]})}),l.jsx("div",{className:"pt-6 border-t border-gray-200",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})})]})})]}),l.jsx(dn,{})]})),dR=[{id:"I",label:"Sales",headline:"Decode Buying Intent to Accelerate Revenue",description:"Transform every sales call and email into a strategic advantage. Identify buying signals, handle objections with data, and clone your top performers' conversational DNA.",steps:[{num:"01",title:"Listen & Probe",body:l.jsxs(l.Fragment,{children:['Connect Genesys or Salesforce to ingest 100% of sales dialogue. Use Active Probing agents to interview lost leads and discover the real "Why" behind churn. See how ',l.jsx("a",{href:"/the-signal/automatic-deal-loss-attribution-ai",className:"text-[#FF3478] hover:underline",children:"Automatic deal-loss attribution (Deals Gone Dark)"})," works."]})},{num:"02",title:"Configure Signals",body:'Set real-time alerts for "Competitor Mentions" or "Pricing Friction". Define semantic tags for high-intent signals that standard CRMs miss.'},{num:"03",title:"Revenue Delivery",body:`Receive "Next-Best-Action" summaries directly in Slack or Pipedrive. Eliminate "dead time" between a lead's signal and an agent's response.`}]},{id:"II",label:"Customer Experience",headline:"Eliminate Friction Before it Impacts Churn",description:"Move beyond reactive support. Use conversational intelligence to map the root causes of customer frustration and automate the path to resolution.",steps:[{num:"01",title:"Connect the Stream",body:"Ingest 100% of Zendesk tickets, WhatsApp chats, and Call Center audio. Deploy agents to conduct post-resolution interviews that probe deeper than a simple NPS score."},{num:"02",title:"Synthesize Sentiment",body:"Configure tagging of conversations showing frustration, unmet needs, or escalation risk. Set alerts for sentiment spikes across any channel."},{num:"03",title:"Actionable Insights",body:'Deliver weekly "Friction Roadmaps" to your CX managers. Automatically update CRM profiles with high-fidelity sentiment data.'}]},{id:"III",label:"Product",headline:"Build What Your Customers Truly Need",description:"Stop guessing feature priority. Lexic synthesizes thousands of hours of user feedback into a deterministic product roadmap.",steps:[{num:"01",title:"Discover Needs",body:"Map conversations from support tickets and client phone calls. Launch AI-driven generative interviews to test new product hypotheses in 3 clicks."},{num:"02",title:"Tag Feature Gaps",body:"Configure analysis to automatically group feature requests by user persona and impact. Identify technical friction points causing usability drop-off."},{num:"03",title:"Deliver Strategy",body:'Receive specialized "Product Opportunity" reports in your inbox. Sync findings directly with Jira or Productboard to prioritize the high-impact backlog.'}]},{id:"IV",label:"Marketing",headline:"Capture the Market Signal Amidst the Noise",description:"Understand how your brand is perceived in real-time. Turn qualitative market sentiment into quantitative growth assets.",steps:[{num:"01",title:"Listen to the Market",body:"Connect Customer Support Channels and Use Active Probing agents to conduct focus groups at infinite scale across your target segments."},{num:"02",title:"Benchmark Sentiment",body:'Set alerts for brand perception shifts or viral sentiment trends. Define "Competitor Positioning" tags to track market share in conversations.'},{num:"03",title:"Targeted Value",body:"Receive automated reports on campaign resonance and brand health. Feed high-intent audience segments directly into your marketing automation tools."}]},{id:"V",label:"IT",headline:"Architect Technical Certainty from Digital Dialogue",description:"Decode technical friction from support logs and system interactions to prevent outages and optimize your infrastructure.",steps:[{num:"01",title:"Ingest System Dialogue",body:"Connect IT helpdesk tickets, incident logs, and internal chat channels. Capture 100% of technical friction reported by your teams."},{num:"02",title:"Tag Error Patterns",body:"Configure detection for recurring failure signatures, escalation triggers, and infrastructure pain points across systems and environments."},{num:"03",title:"Prevent & Optimize",body:"Receive predictive outage alerts and root-cause summaries. Feed findings into Jira or ServiceNow to close the loop before incidents escalate."}]},{id:"VI",label:"Quality Assurance",headline:"Automate 100% Compliance and Performance",description:"Replace random sampling with 100% coverage. Ensure every agent interaction meets legal standards and performance KPIs automatically.",steps:[{num:"01",title:"Capture Every Interaction",body:l.jsxs(l.Fragment,{children:["Ingest 100% of call recordings, chat transcripts, and email threads. No more sampling — full coverage across every channel and agent. Learn about ",l.jsx("a",{href:"/the-signal/automated-call-center-qa-framework",className:"text-[#FF3478] hover:underline",children:"Automating 100% of Call Center QA"}),"."]})},{num:"02",title:"Score & Flag Automatically",body:"Configure compliance rubrics and performance KPIs. Auto-flag interactions breaching legal standards, tone policies, or resolution protocols."},{num:"03",title:"Coach & Report",body:"Deliver individual agent scorecards and team-level QA dashboards. Sync coaching alerts directly into your LMS or CRM."}]},{id:"VII",label:"Operations",headline:"Operational Excellence Through Dialogue Analysis",description:"Identify bottlenecks in your workflows by listening to the friction reported by your teams and partners.",steps:[{num:"01",title:"Listen to the Workflow",body:"Ingest internal communications, partner calls, and field team reports. Surface the operational friction your dashboards never capture."},{num:"02",title:"Map Bottlenecks",body:"Configure analysis to detect recurring process failures, handoff breakdowns, and SLA risks across departments and supply chain touchpoints."},{num:"03",title:"Execute & Streamline",body:"Deliver operational friction reports to your COO. Trigger automated workflow adjustments in SAP, Dynamics, or your logistics platform."}]},{id:"VIII",label:"Insights & Research",headline:"The Scalability of a Survey. The Depth of a Focus Group.",description:l.jsxs(l.Fragment,{children:["Stop relying on static forms. Use generative AI agents to dive into motivations, frustrations, and needs with human-like depth. Explore ",l.jsx("a",{href:"/the-signal/best-ai-moderated-interview-platforms-2026",className:"text-[#FF3478] hover:underline",children:"The best AI-moderated interview platforms"}),"."]}),steps:[{num:"01",title:"Deploy the Research Agent",body:"Launch AI-driven generative interviews across your target audience in minutes. Test hypotheses, explore motivations, and probe unmet needs at scale."},{num:"02",title:"Synthesize the Signal",body:"Configure thematic clustering to group responses by sentiment, persona, and strategic relevance. Replace manual coding with automated insight extraction."},{num:"03",title:"Deliver the Intelligence",body:"Receive structured research reports ready for board presentations or product strategy sessions. Export findings directly into your BI or research platform."}]}],hR=({onClick:t})=>l.jsxs("button",{onClick:t,className:"group relative flex items-center gap-2 rounded-full px-7 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white overflow-hidden transition-all duration-300",style:{backgroundImage:"linear-gradient(135deg, #FF3478 0%, #FF8401 100%)"},children:[l.jsx("span",{className:"absolute inset-0 bg-white opacity-0 group-hover:opacity-10 transition-opacity duration-300 rounded-full"}),"Book a Briefing",l.jsx(qr,{size:14,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]}),tre=()=>{const t=Kf(),{openCalendar:e}=pc();return l.jsxs("section",{style:{fontFamily:"Quicksand, sans-serif",background:"#150835"},children:[l.jsx("div",{className:"w-full px-6 md:px-16 lg:px-24 pt-32 pb-20",style:{background:"linear-gradient(135deg, #150835 0%, #1a0b45 40%, #240AFF 100%)"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsx(me.span,{className:"inline-block text-[#FF3478] text-xs font-medium uppercase tracking-[0.35em] mb-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:"Solutions"}),l.jsx(me.h1,{className:"text-4xl md:text-6xl lg:text-7xl font-light text-white mb-6 max-w-4xl leading-tight",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},children:"Powering the Architecture of Human Intelligence"}),l.jsx(me.p,{className:"text-base md:text-lg text-white/60 max-w-2xl font-light leading-relaxed",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:"Eight vertical engines. One unified intelligence layer. Built to decode the signal in every conversation your business has."}),l.jsx(me.div,{className:"mt-10",initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,delay:.35},children:l.jsx("div",{className:"inline-flex items-center rounded-full border border-white/15 overflow-hidden",style:{background:"rgba(255,255,255,0.06)",backdropFilter:"blur(8px)"},children:dR.map(n=>l.jsxs("button",{onClick:()=>{const i=n.label.toLowerCase().replace(/\s+/g,"-").replace(/&/g,"and"),r=document.getElementById(`solution-${i}`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})},className:"group px-4 py-2.5 text-[10px] font-medium uppercase tracking-[0.25em] text-white/55 hover:text-white transition-colors duration-200 whitespace-nowrap border-r border-white/10 last:border-r-0 relative",children:[n.label,l.jsx("span",{className:"absolute bottom-0 left-4 right-4 h-px scale-x-0 group-hover:scale-x-100 transition-transform duration-200 origin-left",style:{background:"#FF3478"}})]},n.id))})})]})}),l.jsx("div",{className:"w-full",children:dR.map((n,i)=>l.jsx(me.div,{id:`solution-${n.label.toLowerCase().replace(/\s+/g,"-").replace(/&/g,"and")}`,className:"w-full px-6 md:px-16 lg:px-24 py-16 md:py-20 border-b border-white/5 scroll-mt-24",style:{background:i%2===0?"#150835":"rgba(255,255,255,0.015)"},initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.6},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs("div",{className:"mb-10",children:[l.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[l.jsx("span",{className:"text-[10px] font-medium tracking-[0.4em] text-white/30 uppercase",children:n.id}),l.jsx("span",{className:"text-xs font-semibold uppercase tracking-[0.3em]",style:{color:"#FF3478"},children:n.label})]}),l.jsx("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white mb-5 max-w-3xl leading-tight",children:n.headline}),l.jsx("p",{className:"text-sm md:text-base text-white/55 font-light leading-relaxed max-w-2xl mb-8",children:n.description}),l.jsx(hR,{onClick:e})]}),n.steps.length>0&&l.jsxs("div",{className:"mt-12",children:[l.jsxs("p",{className:"text-[10px] font-medium uppercase tracking-[0.4em] text-white/30 mb-6",children:["The ",n.label," Implementation Engine"]}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:n.steps.map((r,s)=>l.jsxs(me.div,{className:"rounded-xl border border-white/8 p-6",style:{background:"rgba(255,255,255,0.03)"},initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:.1*s},children:[l.jsx("span",{className:"text-[10px] font-medium tracking-[0.35em] text-white/25 mb-3 block",children:r.num}),l.jsx("h4",{className:"text-sm font-semibold text-white mb-3 leading-snug",children:r.title}),l.jsx("p",{className:"text-xs text-white/50 font-light leading-relaxed",children:r.body})]},r.num))})]})]})},n.id))}),l.jsx(me.div,{className:"w-full px-6 md:px-16 lg:px-24 py-24",style:{background:"linear-gradient(135deg, #150835 0%, #1a0b45 60%, #240AFF 100%)"},initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.7},children:l.jsxs("div",{className:"max-w-6xl mx-auto text-center",children:[l.jsx("h2",{className:"text-3xl md:text-5xl font-light text-white mb-10 leading-tight",children:"Ready to Decode Your Conversations?"}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4",children:[l.jsxs("button",{onClick:()=>t("/platform"),className:"group flex items-center gap-2 border border-white/40 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white hover:bg-white hover:text-[#150835] transition-colors duration-300",children:["Explore the Platform",l.jsx(qr,{size:14,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]}),l.jsx(hR,{onClick:e})]})]})})]})},nre=()=>l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"AI Solutions for Sales, CX, Product and Operations - Lexic.AI",description:"Turn conversations into actionable insights across Sales, Customer Experience, Product, Marketing, IT and Operations."}),l.jsx(un,{}),l.jsx(tre,{}),l.jsx(dn,{})]}),ire="/assets/bankinter-D3JqIY4v.png",rre="/assets/telefonica-BGqwLBC4.png",sre="/assets/achilles-logo-BhcW26XD.png",are="/assets/totalenergies-CDamilr1.png",ore="/assets/256px-Repsol_2025_vertical_.svg-BQMbbkx-.png",lre="/assets/greenflex-r-zC7H-M.png",cre="/assets/ecovidrio--nOsXzwV.png",ure="/assets/Novo_logotipo_Delta_1-CLcaAznq.png",dre="/assets/BSH-DmXs06vj.png",hre="/assets/cellnex-BzEnKsXQ.svg",fre="/assets/Stadler-iLecF2W7.png",pre="/assets/Logo-CoolWay-DeAPY7XC.png",mre="/assets/daorje-CTOfvDqe.png",gre="/assets/googleforstartups-DM7XEPHF.png",xre="/assets/Santander_x100-CdXruWog.jpg",yre="/assets/logo-enisa-c-sLqaFe.jpg",vre="/assets/ITBranchen-H4bfXof2.png",wre="/assets/ISO27001-C0h2KpIx.png",bre="/assets/GDPR-F-osIXGN.png",_re=[{name:"Bankinter",logo:ire},{name:"Telefonica",logo:rre},{name:"Achilles",logo:sre},{name:"TotalEnergies",logo:are},{name:"Repsol",logo:ore},{name:"GreenFlex",logo:lre},{name:"Ecovidrio",logo:cre},{name:"Delta Cafes",logo:ure},{name:"BSH",logo:dre},{name:"Cellnex",logo:hre},{name:"Stadler",logo:fre},{name:"Colway",logo:pre},{name:"Daorje",logo:mre},{name:"Closca",logo:null}],Sre=[{name:"Google for Startups",logo:gre},{name:"Santander x100",logo:xre},{name:"ENISA",logo:yre},{name:"IT Branchen",logo:vre}],Are=[{name:"ISO 27001",logo:wre},{name:"GDPR",logo:bre}],Mre=["Google Cloud","Telnyx","LiveKit","Smartloop"],Tre=()=>{const{openCalendar:t}=pc();return l.jsxs("div",{style:{fontFamily:"Quicksand, sans-serif"},children:[l.jsx(mn,{title:"Partners and Clients - Lexic.AI",description:"Companies and institutions partnering with Lexic.AI for conversational intelligence."}),l.jsx(un,{}),l.jsx("div",{className:"w-full px-6 md:px-16 lg:px-24 pt-32 pb-20",style:{background:"linear-gradient(135deg, #150835 0%, #1a0b45 40%, #240AFF 100%)"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsx(me.span,{className:"inline-block text-[#FF3478] text-xs font-medium uppercase tracking-[0.35em] mb-6",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},children:"Our Partner Ecosystem"}),l.jsx(me.h1,{className:"text-4xl md:text-6xl lg:text-7xl font-light text-white mb-6 max-w-4xl leading-tight",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},children:"Built with the Best"}),l.jsx(me.p,{className:"text-base md:text-lg text-white/60 max-w-2xl font-light leading-relaxed",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.2},children:"Collaborating with global innovators to bridge the gap between raw human data and deterministic enterprise execution."})]})}),l.jsx("div",{className:"w-full px-6 md:px-16 lg:px-24 py-20",style:{background:"#150835"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs(me.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mb-10",children:[l.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-3",children:"Implementation Partners"}),l.jsx("h2",{className:"text-2xl md:text-3xl font-light text-white",children:"Deployed Across Global Enterprises"})]}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:_re.map((e,n)=>l.jsxs(BV,{children:[l.jsx(VV,{asChild:!0,children:l.jsx(me.div,{className:"rounded-xl border border-gray-200 bg-white flex items-center justify-center h-28 md:h-32 cursor-pointer transition-all duration-300 hover:shadow-lg px-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:.06*n},children:e.logo?l.jsx("img",{src:e.logo,alt:e.name,loading:"lazy",className:"max-h-12 object-contain opacity-80 hover:opacity-100 transition-opacity duration-300"}):l.jsx("span",{className:"text-gray-400 text-sm font-medium tracking-wider uppercase",children:e.name})})}),l.jsx(aL,{side:"bottom",className:"bg-[#150835] border-white/20 text-white text-xs",children:"Deployed Transactional Agentic Logic"})]},`${e.name}-${n}`))}),l.jsx("div",{className:"flex justify-center mt-12",children:l.jsxs(me.button,{onClick:t,className:"group flex items-center gap-2 border border-white/40 rounded-full px-8 py-3 text-xs font-medium uppercase tracking-[0.25em] text-white hover:bg-[#240AFF] hover:border-[#240AFF] transition-colors duration-300",initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.5,delay:.2},children:["Start Architecting",l.jsx(qr,{size:16,className:"transition-transform duration-300 group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]})})]})}),l.jsx("div",{className:"w-full px-6 md:px-16 lg:px-24 py-20",style:{background:"#150835"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs(me.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mb-10",children:[l.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-3",children:"Institutional Support"}),l.jsx("h2",{className:"text-2xl md:text-3xl font-light text-white",children:"Backed by Leading Institutions"})]}),l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:Sre.map((e,n)=>l.jsx(me.div,{className:"rounded-xl border border-gray-200 bg-white flex items-center justify-center h-28 md:h-32 px-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:.08*n},children:l.jsx("img",{src:e.logo,alt:e.name,loading:"lazy",className:"max-h-12 object-contain"})},e.name))})]})}),l.jsx("div",{className:"w-full px-6 md:px-16 lg:px-24 py-20",style:{background:"#150835"},children:l.jsxs("div",{className:"max-w-6xl mx-auto",children:[l.jsxs(me.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"mb-10",children:[l.jsx("span",{className:"block text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-3",children:"Compliance"}),l.jsx("h2",{className:"text-2xl md:text-3xl font-light text-white",children:"Enterprise-Grade Standards"})]}),l.jsx("div",{className:"grid grid-cols-2 gap-4 max-w-xs",children:Are.map((e,n)=>l.jsx(me.div,{className:"rounded-xl border border-gray-200 bg-white flex items-center justify-center h-28 md:h-32 px-6",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:.08*n},children:l.jsx("img",{src:e.logo,alt:e.name,loading:"lazy",className:"max-h-12 object-contain"})},e.name))})]})}),l.jsx("div",{className:"w-full px-6 md:px-16 lg:px-24 py-20",style:{background:"#150835"},children:l.jsx("div",{className:"max-w-6xl mx-auto",children:l.jsxs(me.div,{className:"rounded-xl border border-white/10 p-8 max-w-xl",initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},children:[l.jsx("h3",{className:"text-xs font-medium uppercase tracking-[0.3em] text-[#FF3478] mb-6",children:"Technology Partners"}),l.jsx("div",{className:"grid grid-cols-2 gap-4",children:Mre.map(e=>l.jsx("div",{className:"text-white/70 text-sm font-light py-3 border-b border-white/5 last:border-0",children:e},e))})]})})}),l.jsx(dn,{})]})};function Ere(t){if(!t)return"";const e=t.split(`
`),n=[];let i=!1,r=null,s=!1,a=!1;const o=()=>{i&&(n.push(r==="ul"?"</ul>":"</ol>"),i=!1,r=null)},c=()=>{s&&(n.push("</tbody></table>"),s=!1,a=!1)},u=f=>f.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>").replace(/\*(.+?)\*/g,"<em>$1</em>").replace(/\[(.+?)\]\((.+?)\)/g,'<a href="$2" class="text-blue-600 underline hover:text-blue-800" target="_blank" rel="noopener noreferrer">$1</a>');for(let f=0;f<e.length;f++){const m=e[f].trimEnd();if(/^---+$/.test(m.trim())){o(),c(),n.push('<hr class="my-8 border-gray-200" />');continue}const g=m.match(/^###\s+(.*)/),y=m.match(/^##\s+(.*)/),b=m.match(/^#\s+(.*)/);if(g){o(),c(),n.push(`<h3 class="text-xl font-semibold mt-8 mb-3 text-gray-800">${u(g[1])}</h3>`);continue}if(y){o(),c(),n.push(`<h2 class="text-2xl font-semibold mt-10 mb-4 text-gray-900">${u(y[1])}</h2>`);continue}if(b){o(),c(),n.push(`<h1 class="text-3xl font-bold mt-12 mb-5 text-gray-900">${u(b[1])}</h1>`);continue}if(m.startsWith("|")){const _=m.split("|").filter((M,E,C)=>E>0&&E<C.length-1);if(_.every(M=>/^[-: ]+$/.test(M))){a=!0;continue}s||(o(),n.push('<div class="overflow-x-auto my-6"><table class="min-w-full text-sm border-collapse border border-gray-200 rounded-lg">'),s=!0,a=!1),a?(n.push('<tr class="even:bg-gray-50">'),_.forEach(M=>{n.push(`<td class="px-4 py-3 text-gray-600 border border-gray-200">${u(M.trim())}</td>`)}),n.push("</tr>")):(n.push('<thead class="bg-gray-50"><tr>'),_.forEach(M=>{n.push(`<th class="px-4 py-3 text-left font-semibold text-gray-700 border border-gray-200">${u(M.trim())}</th>`)}),n.push("</tr></thead><tbody>"));continue}else c();const w=m.match(/^[-*]\s+(.*)/);if(w){(!i||r!=="ul")&&(o(),n.push('<ul class="list-disc list-outside ml-6 my-4 space-y-2 text-gray-700">'),i=!0,r="ul"),n.push(`<li class="leading-relaxed">${u(w[1])}</li>`);continue}const x=m.match(/^\d+\.\s+(.*)/);if(x){(!i||r!=="ol")&&(o(),n.push('<ol class="list-decimal list-outside ml-6 my-4 space-y-2 text-gray-700">'),i=!0,r="ol"),n.push(`<li class="leading-relaxed">${u(x[1])}</li>`);continue}if(m.trim()===""){o(),c(),n.push("");continue}o(),n.push(`<p class="my-4 leading-relaxed text-gray-700">${u(m)}</p>`)}return o(),c(),n.join(`
`)}const fR="https://lexic.ai",pR=t=>t==="Case Study";function Cre(t){return new Date(t).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}const Pre=()=>{const{slug:t}=VH(),{pathname:e}=Xo(),i=t4.posts.en.find(a=>a.slug===t);if(I.useEffect(()=>{const a=document.querySelector("script[data-article-jsonld]");if(a&&a.remove(),!i)return;const o=e.startsWith("/report"),c=`${fR}${e}`,u={"@context":"https://schema.org","@type":pR(i.category)?"Article":"BlogPosting",headline:i.title,description:i.excerpt,author:{"@type":"Person",name:i.author},publisher:{"@type":"Organization",name:"Lexic.AI",url:fR},datePublished:i.date,url:c,mainEntityOfPage:c,...o?{"@type":"Report"}:{}},f=document.createElement("script");return f.type="application/ld+json",f.setAttribute("data-article-jsonld",""),f.textContent=JSON.stringify(u),document.head.appendChild(f),()=>{f.remove()}},[i,e]),!i)return l.jsxs(l.Fragment,{children:[l.jsx(un,{}),l.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center text-white",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)"},children:[l.jsx("h1",{className:"text-4xl font-light mb-4",children:"Article not found"}),l.jsx("p",{className:"text-white/60 mb-8",children:"The article you're looking for doesn't exist or has been moved."}),l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/80 hover:text-white transition-colors",children:[l.jsx(kt,{size:16}),"Back to The Signal"]})]}),l.jsx(dn,{})]});const r=i.fullContent?Ere(i.fullContent):null,s=pR(i.category)?"#FF3478":"#4ade80";return l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:`${i.title} - Lexic.AI`,description:i.excerpt}),l.jsx(un,{}),l.jsx("header",{className:"w-full pt-24 pb-16 px-6",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)",fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm font-medium transition-colors mb-10",children:[l.jsx(kt,{size:16}),"Back to The Signal"]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-3 mb-6",children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:s}}),l.jsx("span",{className:"text-xs font-medium uppercase tracking-widest",style:{color:s},children:i.category})]}),l.jsx("span",{className:"text-white/30 text-xs",children:"·"}),l.jsxs("span",{className:"flex items-center gap-1 text-white/50 text-xs",children:[l.jsx(wB,{size:12}),Cre(i.date)]}),l.jsx("span",{className:"text-white/30 text-xs",children:"·"}),l.jsxs("span",{className:"flex items-center gap-1 text-white/50 text-xs",children:[l.jsx(g3,{size:12}),i.readTime]})]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight mb-6",children:i.title}),l.jsxs("p",{className:"text-white/50 text-sm font-light",children:["By ",l.jsx("span",{className:"text-white/70",children:i.author})]})]})}),l.jsx("main",{className:"w-full bg-white py-12 px-6",style:{fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[r?l.jsx("article",{className:"prose-article",dangerouslySetInnerHTML:{__html:r}}):l.jsx("div",{className:"flex flex-col items-center justify-center py-24 text-center",children:l.jsxs("div",{className:"max-w-lg",children:[l.jsx("p",{className:"text-lg text-gray-600 leading-relaxed mb-8",children:i.excerpt}),l.jsx("div",{className:"w-16 h-0.5 bg-gray-200 mx-auto mb-8"}),l.jsx("p",{className:"text-gray-400 text-sm",children:"Full article content coming soon."}),l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 mt-8 text-blue-600 hover:text-blue-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:14}),"Back to The Signal"]})]})}),r&&l.jsx("div",{className:"mt-16 pt-8 border-t border-gray-100",children:l.jsxs(We,{to:"/signal",className:"inline-flex items-center gap-2 text-gray-500 hover:text-gray-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:14}),"Back to The Signal"]})})]})}),l.jsx(dn,{})]})},Nre=()=>l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Page Not Found - Lexic.AI",description:"The page you're looking for doesn't exist or has been moved."}),l.jsx(un,{}),l.jsxs("main",{className:"min-h-[70vh] flex flex-col items-center justify-center px-6 text-center",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)",fontFamily:"Quicksand, sans-serif"},children:[l.jsx("p",{className:"text-[#FF3478] text-sm uppercase tracking-[0.3em] font-semibold mb-4",children:"Error 404"}),l.jsx("h1",{className:"text-5xl md:text-7xl font-light text-white mb-6",children:"Page not found"}),l.jsx("p",{className:"text-white/50 max-w-md text-lg font-light mb-10",children:"The page you're looking for doesn't exist or has been moved."}),l.jsxs(We,{to:"/",className:"inline-flex items-center gap-2 bg-white/10 hover:bg-white/20 text-white px-6 py-3 rounded-full text-sm font-medium transition-colors backdrop-blur-sm",children:[l.jsx(kt,{size:16}),"Back to Home"]})]}),l.jsx(dn,{})]}),Rre=()=>l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Privacy Policy - Lexic.AI",description:"Lexic.AI privacy policy and data handling practices."}),l.jsx(un,{}),l.jsx("header",{className:"w-full pt-24 pb-16 px-6",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)",fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm font-medium transition-colors mb-10",children:[l.jsx(kt,{size:16}),"Back to Home"]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[l.jsx("span",{className:"text-xs font-medium uppercase tracking-widest text-[#FF3478]",children:"Legal"}),l.jsx("span",{className:"text-white/30 text-xs",children:"·"}),l.jsx("span",{className:"text-white/50 text-xs",children:"Effective Date: June 18, 2025"})]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight mb-6",children:"Privacy Policy"}),l.jsx("p",{className:"text-white/60 text-sm font-light leading-relaxed max-w-2xl",children:"Lexic.AI & Lexic Pulse Privacy Policy — Predictify Solutions S.L., with registered offices at Paseo de la Castellana 200, 28027, Madrid."})]})}),l.jsx("main",{className:"w-full bg-white py-12 px-6",style:{fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-3xl mx-auto prose-article",children:[l.jsx("p",{className:"text-gray-600 leading-relaxed mb-10",children:'Predictify Solutions S.L. (hereinafter, "Lexic", "we", "us", or "our"), with registered offices at Paseo de la Castellana 200, 28027, Madrid, is committed to the protection of personal data in accordance with the General Data Protection Regulation (EU) 2016/679 (GDPR) and the Spanish Organic Law 3/2018 (LOPDGDD). This policy governs data processing for both our corporate site and the Lexic Pulse platform.'}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"1. Data Processing Roles"}),l.jsx("p",{className:"text-gray-600 leading-relaxed mb-4",children:"To ensure transparency and compliance, we distinguish between two primary processing scenarios:"}),l.jsxs("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsx("strong",{className:"text-gray-800",children:"Lexic as Data Controller:"})," We act as the Controller when processing data from website visitors, direct business clients (corporate contact data), and newsletter subscribers to manage commercial relationships and legitimate interests."]})]}),l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsx("strong",{className:"text-gray-800",children:"Lexic as Data Processor:"}),' We act as the Processor when handling "End Customer" data (interviewees) on behalf of our corporate Clients through Lexic Pulse. In this capacity, the corporate Client remains the Data Controller, responsible for establishing the legal basis (consent or legitimate interest).']})]})]})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"2. Data Categories and Purpose"}),l.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200 mb-4",children:l.jsxs("table",{className:"w-full text-sm text-left",children:[l.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:l.jsxs("tr",{children:[l.jsx("th",{className:"px-5 py-3 font-semibold text-gray-700",children:"Data Category"}),l.jsx("th",{className:"px-5 py-3 font-semibold text-gray-700",children:"Purpose"}),l.jsx("th",{className:"px-5 py-3 font-semibold text-gray-700",children:"Legal Basis"})]})}),l.jsxs("tbody",{className:"divide-y divide-gray-100",children:[l.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[l.jsx("td",{className:"px-5 py-4 text-gray-800 font-medium align-top",children:"Corporate/Commercial: Name, email, company, job title."}),l.jsx("td",{className:"px-5 py-4 text-gray-600 align-top",children:"Lead management, technical support, and contractual relationship management."}),l.jsx("td",{className:"px-5 py-4 text-gray-600 align-top",children:"Performance of a Contract / Legitimate Interest."})]}),l.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[l.jsx("td",{className:"px-5 py-4 text-gray-800 font-medium align-top",children:"Lexic Pulse Data: Phone numbers, voice/text responses, metadata, and transcripts."}),l.jsx("td",{className:"px-5 py-4 text-gray-600 align-top",children:"Conducting AI-powered interviews to collect structured feedback."}),l.jsx("td",{className:"px-5 py-4 text-gray-600 align-top",children:"Documented instructions from the Controller (Art. 28 GDPR)."})]})]})]})}),l.jsx("p",{className:"text-gray-500 text-sm leading-relaxed italic",children:"Note: Lexic.AI guarantees that we do not intentionally collect special categories of data (sensitive data) unless explicitly requested by the Client and protected under reinforced security safeguards."})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"3. Information Security & AI Governance"}),l.jsx("p",{className:"text-gray-600 leading-relaxed mb-4",children:'Backed by our expertise in AI, Lexic implements "security by design" through:'}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"EU-Based Hosting",text:"Primary processing occurs within AWS (Europe Region) infrastructure."},{label:"Advanced Anonymization",text:"We utilize proprietary Python-based workflows to anonymize data sets before any model refinement or high-level analysis."},{label:"Encryption Standards",text:"Data is protected using AES-256 encryption at rest and TLS/SSL with end-to-end SFTP protocols in transit."},{label:"Access Control",text:"Strict Role-Based Access Control (RBAC) and Multi-Factor Authentication (MFA) for all internal systems."}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#240AFF] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"4. Data Retention"}),l.jsx("p",{className:"text-gray-600 leading-relaxed",children:"We retain personal data only for as long as necessary to fulfill the purposes described or as instructed by the Data Controller. Upon termination of services, data is either deleted or returned to the Client, except for data that must remain blocked to comply with statutory limitation periods under Spanish law."})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"5. International Data Transfers"}),l.jsx("p",{className:"text-gray-600 leading-relaxed",children:"Lexic does not transfer data outside the European Economic Area (EEA) by default. If a service requires a sub-processor outside the EEA, we ensure compliance through Standard Contractual Clauses (SCCs) and Supplementary Measures to guarantee an equivalent level of protection."})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"6. Data Subject Rights"}),l.jsx("p",{className:"text-gray-600 leading-relaxed mb-4",children:"Individuals may exercise their rights of access, rectification, erasure, objection, restriction, and data portability."}),l.jsxs("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsx("span",{children:"For data processed via Lexic Pulse, we recommend contacting the company that initiated the survey (the Controller) directly."})]}),l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:["For any requests directed to Lexic, please contact our Data Protection Officer at"," ",l.jsx("a",{href:"mailto:dpo@lexic.ai",className:"text-[#240AFF] hover:underline font-medium",children:"dpo@lexic.ai"}),"."]})]})]})]}),l.jsxs("section",{className:"mb-10 rounded-xl border border-[#240AFF]/20 bg-[#240AFF]/[0.04] p-6",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-3",children:"Executive Summary for Lexic.AI"}),l.jsx("p",{className:"text-gray-600 leading-relaxed",children:"This unified Privacy Policy establishes Lexic.AI as a leader in AI compliance. By clearly distinguishing between Controller and Processor roles and integrating high-level security measures (such as AWS-EU hosting and automated anonymization), we provide our clients with total legal peace of mind. This document ensures that Lexic Pulse is not just a powerful research tool, but a legally fortified solution that protects both our clients' brands and their customers' privacy."})]}),l.jsx("div",{className:"mt-16 pt-8 border-t border-gray-100",children:l.jsxs(We,{to:"/",className:"inline-flex items-center gap-2 text-gray-500 hover:text-gray-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:14}),"Back to Home"]})})]})}),l.jsx(dn,{})]}),Ire=()=>l.jsxs(l.Fragment,{children:[l.jsx(mn,{title:"Terms of Service - Lexic.AI",description:"Lexic.AI terms and conditions of service."}),l.jsx(un,{}),l.jsx("header",{className:"w-full pt-24 pb-16 px-6",style:{background:"linear-gradient(165deg, #240AFF 0%, #1a08cc 60%, #150835 100%)",fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs(We,{to:"/",className:"inline-flex items-center gap-2 text-white/60 hover:text-white text-sm font-medium transition-colors mb-10",children:[l.jsx(kt,{size:16}),"Back to Home"]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-6",children:[l.jsx("span",{className:"text-xs font-medium uppercase tracking-widest text-[#FF3478]",children:"Legal"}),l.jsx("span",{className:"text-white/30 text-xs",children:"·"}),l.jsx("span",{className:"text-white/50 text-xs",children:"Effective Date: December 18, 2025"})]}),l.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-light text-white leading-tight mb-6",children:"Terms of Service"}),l.jsx("p",{className:"text-white/60 text-sm font-light leading-relaxed max-w-2xl",children:"Integrated Service Terms for Lexic.AI — Predictify Solutions S.L., with registered offices at Paseo de la Castellana 200, 28027, Madrid."})]})}),l.jsx("main",{className:"w-full bg-white py-12 px-6",style:{fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"max-w-3xl mx-auto",children:[l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-1",children:"1. Terms of Service"}),l.jsx("p",{className:"text-xs text-gray-400 mb-6",children:"Effective Date: December 18, 2025"}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"1.1. Service Description"}),l.jsx("p",{className:"text-gray-600 leading-relaxed",children:"Lexic provides a suite of AI-driven solutions: Lexic Pulse (SaaS platform for customer research), AI Health Companion (Patient-Reported Outcomes), and AI Consulting. Lexic guarantees that these Services are built on state-of-the-art infrastructure, prioritizing adaptability and regulatory compliance."})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"1.2. Fees and Payment"}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"Pricing Structure",text:"The Service consists of a recurring License Fee (platform access) and variable Usage Fees (per call/message/interview)."},{label:"Payment Terms",text:"All invoices shall be paid within thirty (30) days from the invoice date."},{label:"Taxes",text:"All fees are exclusive of VAT or applicable local taxes."}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"1.3. Client Warranties & AI Transparency"}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"Consent",text:"The Client warrants they possess a valid lawful basis (Consent or Legitimate Interest) for all data subjects uploaded."},{label:"Disclosure",text:"The Client must inform end-users that they are interacting with an AI system, in compliance with the EU AI Act."},{label:"Telecom",text:'The Client is responsible for local "Do Not Call" registries and anti-spam laws.'}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"1.4. Intellectual Property & Liability"}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"Ownership",text:"Lexic retains all rights to its algorithms and software. The Client retains rights to their raw data."},{label:"Liability",text:"Lexic's total liability is limited to the amount paid by the Client in the 12 months preceding any incident."}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-1",children:"2. Privacy Policy (Unified)"}),l.jsx("p",{className:"text-xs text-gray-400 mb-6",children:"Effective Date: June 18, 2025"}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"2.1. Roles"}),l.jsxs("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsx("strong",{className:"text-gray-800",children:"Lexic as Data Controller:"})," For website visitors and direct business contacts."]})]}),l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsx("strong",{className:"text-gray-800",children:"Lexic as Data Processor:"}),' For "End Customer" data processed via Lexic Pulse on behalf of the Client.']})]})]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"2.2. Security & AI Governance"}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"EU Residency",text:"All primary processing occurs within AWS (Europe Region)."},{label:"Anonymization",text:"We apply automated anonymization protocols to protect data sets before model analysis."},{label:"Encryption",text:"Data is protected using AES-256 at rest and TLS/SSL in transit."}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#240AFF] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"2.3. Data Subject Rights"}),l.jsxs("p",{className:"text-gray-600 leading-relaxed",children:["Individuals may exercise rights of access, rectification, erasure, and portability via"," ",l.jsx("a",{href:"mailto:dpo@lexic.ai",className:"text-[#240AFF] hover:underline font-medium",children:"dpo@lexic.ai"}),". For Lexic Pulse data, users are encouraged to contact the Client (the Controller) directly."]})]})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-1",children:"3. Service Level Agreement (SLA)"}),l.jsx("p",{className:"text-xs text-gray-400 mb-6",children:"Annex I to the Terms of Service"}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"3.1. Uptime Guarantee"}),l.jsxs("p",{className:"text-gray-600 leading-relaxed",children:["Lexic.AI guarantees a Monthly Uptime Percentage of at least"," ",l.jsx("strong",{className:"text-gray-800",children:"99.5%"})," for the Lexic Pulse platform."]})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"3.2. Service Credits"}),l.jsx("p",{className:"text-gray-600 leading-relaxed mb-4",children:"If uptime falls below the guarantee, the Client is eligible for credits against the monthly License Fee:"}),l.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200",children:l.jsxs("table",{className:"w-full text-sm text-left",children:[l.jsx("thead",{className:"bg-gray-50 border-b border-gray-200",children:l.jsxs("tr",{children:[l.jsx("th",{className:"px-5 py-3 font-semibold text-gray-700",children:"Uptime Range"}),l.jsx("th",{className:"px-5 py-3 font-semibold text-gray-700",children:"Credit"})]})}),l.jsxs("tbody",{className:"divide-y divide-gray-100",children:[l.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[l.jsx("td",{className:"px-5 py-4 text-gray-800 font-medium",children:"99.0% – <99.5%"}),l.jsx("td",{className:"px-5 py-4 text-gray-600",children:"5% credit"})]}),l.jsxs("tr",{className:"hover:bg-gray-50 transition-colors",children:[l.jsx("td",{className:"px-5 py-4 text-gray-800 font-medium",children:"<99.0%"}),l.jsx("td",{className:"px-5 py-4 text-gray-600",children:"10% credit"})]})]})]})})]}),l.jsxs("div",{className:"mb-6",children:[l.jsx("h3",{className:"text-base font-semibold text-gray-800 mb-3",children:"3.3. Support Response Times"}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"Critical (System Down)",text:"4 business hours."},{label:"Standard (Queries)",text:"24 business hours."}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#FF3478] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]})]}),l.jsxs("section",{className:"mb-10",children:[l.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-4",children:"4. Data Processing Agreement (DPA) Summary"}),l.jsx("p",{className:"text-gray-600 leading-relaxed mb-4",children:"In accordance with Art. 28 GDPR:"}),l.jsx("ul",{className:"space-y-3 text-gray-600 leading-relaxed list-none pl-0",children:[{label:"Instructions",text:"Lexic processes data only on documented Client instructions."},{label:"Confidentiality",text:"All personnel are bound by strict non-disclosure agreements (NDAs)."},{label:"Sub-processors",text:"Lexic only uses vetted sub-processors (e.g., AWS) and notifies Clients of changes."},{label:"Breach Notification",text:"Lexic will notify the Client of any data breach without undue delay."}].map(({label:t,text:e})=>l.jsxs("li",{className:"flex gap-3",children:[l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-[#240AFF] shrink-0"}),l.jsxs("span",{children:[l.jsxs("strong",{className:"text-gray-800",children:[t,":"]})," ",e]})]},t))})]}),l.jsx("div",{className:"mt-16 pt-8 border-t border-gray-100",children:l.jsxs(We,{to:"/",className:"inline-flex items-center gap-2 text-gray-500 hover:text-gray-800 text-sm font-medium transition-colors",children:[l.jsx(kt,{size:14}),"Back to Home"]})})]})}),l.jsx(dn,{})]}),kre=()=>{const{isOpen:t,closeModal:e}=JD();return I.useEffect(()=>{if(!t)return;const n=i=>{i.key==="Escape"&&e()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[t,e]),I.useEffect(()=>{if(!t)return;const n=i=>{var r,s;((r=i.data)==null?void 0:r.type)==="hsFormCallback"&&((s=i.data)==null?void 0:s.eventName)==="onFormSubmitted"&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"contact_form_submit",eventCategory:"Form",eventAction:"submit",eventLabel:"Contact Send"}))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[t]),I.useEffect(()=>(document.body.style.overflow=t?"hidden":"",()=>{document.body.style.overflow=""}),[t]),t?hy.createPortal(l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 md:p-8","aria-modal":"true",role:"dialog","aria-label":"Contact Us",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:e}),l.jsxs("div",{className:"relative z-10 w-full max-w-2xl rounded-2xl overflow-hidden shadow-2xl",style:{background:"#150835",maxHeight:"90vh"},children:[l.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-black/10 bg-white",children:[l.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.25em]",style:{background:"linear-gradient(90deg, #FF3478, #FF8401)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Contact Us"}),l.jsx("button",{onClick:e,className:"text-black/40 hover:text-black transition-colors duration-200 p-1","aria-label":"Close",children:l.jsx(nc,{size:20})})]}),l.jsx("div",{className:"overflow-y-auto px-6 py-6 bg-white",style:{maxHeight:"calc(90vh - 64px)"},children:l.jsx("div",{className:"hs-form-frame","data-region":"na1","data-portal-id":"49500805","data-form-id":"f011f3f1-a3e8-4f44-8039-5e59b57695b3"})})]})]}),document.body):null},Lre=()=>{const{isCalendarOpen:t,closeCalendar:e}=pc();return I.useEffect(()=>{if(!t)return;const n=i=>{i.key==="Escape"&&e()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[t,e]),I.useEffect(()=>(document.body.style.overflow=t?"hidden":"",()=>{document.body.style.overflow=""}),[t]),I.useEffect(()=>{if(!t)return;const n=document.createElement("script");return n.src="https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js",n.type="text/javascript",n.async=!0,document.body.appendChild(n),()=>{document.body.removeChild(n)}},[t]),I.useEffect(()=>{if(!t)return;const n=i=>{var r;((r=i.data)!=null&&r.meetingBookSucceeded||typeof i.data=="string"&&i.data.includes("meetingBookSucceeded"))&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"meeting_booked",eventCategory:"Form",eventAction:"submit",eventLabel:"Meeting Completed"}))};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)},[t]),t?hy.createPortal(l.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4 md:p-8","aria-modal":"true",role:"dialog","aria-label":"Book a Meeting",children:[l.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm",onClick:e}),l.jsxs("div",{className:"relative z-10 w-full max-w-2xl rounded-2xl overflow-hidden shadow-2xl",style:{background:"#150835",maxHeight:"90vh"},children:[l.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-black/10 bg-white",children:[l.jsx("span",{className:"text-xs font-medium uppercase tracking-[0.25em]",style:{background:"linear-gradient(90deg, #FF3478, #FF8401)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"Book a Meeting"}),l.jsx("button",{onClick:e,className:"text-black/40 hover:text-black transition-colors duration-200 p-1","aria-label":"Close",children:l.jsx(nc,{size:20})})]}),l.jsx("div",{className:"overflow-y-auto bg-white",style:{maxHeight:"calc(90vh - 64px)"},children:l.jsx("div",{className:"meetings-iframe-container","data-src":"https://meetings.hubspot.com/sergio-llorens-rubio/lexic-sales-contact?embed=true"})})]})]}),document.body):null},Dre={es:"604a58cc-5329-49ac-bdc4-d37b9e522a5b",en:"c434e141-d22f-4845-ba38-cd0955c5b2f6"},ub=()=>{const t=document.getElementById("lexic-widget-script");t&&t.remove();const e=document.getElementById("lexicpulse-widget-root");e&&(e.innerHTML=""),document.querySelectorAll("body > div:not(#root):not(#lexicpulse-widget-root)").forEach(n=>{var i,r;((i=n.id)!=null&&i.includes("lexic")||(r=n.className)!=null&&r.toString().includes("lexic"))&&n.remove()}),document.querySelectorAll('iframe[src*="widget.lexic"]').forEach(n=>n.remove())},Fre=()=>{const[t,e]=I.useState("closed"),[n,i]=I.useState(null),r=o=>{ub();const c=JSON.stringify({expert_id:Dre[o],jinja_html:"landing-leads-page.html",with_metadata_labels:["Name","Email","Phone"],type_widget:"Medium"}),u=document.createElement("script");u.src="https://static.widget.lexic.ai/widget-latest/widget.js",u.defer=!0,u.setAttribute("data-client-widget-title","Call"),u.setAttribute("data-client-widget-subtitle-call-button","Enter your info to get started"),u.setAttribute("data-client-icon-color","#FF4D2A"),u.setAttribute("data-client-button-bg","#FF4D2A"),u.setAttribute("data-client-agent-metadata",c),u.style.cssText="position: fixed; bottom: 20px; right: 20px;",u.id="lexic-widget-script",document.body.appendChild(u)};I.useEffect(()=>()=>ub(),[]);const s=o=>{i(o),e("active"),r(o)},a=()=>{ub(),e("closed"),i(null)};return l.jsxs(l.Fragment,{children:[t==="closed"&&l.jsx("button",{onClick:()=>e("picking"),className:"fixed z-[9999] flex items-center justify-center w-14 h-14 rounded-full shadow-lg transition-transform duration-200 hover:scale-110 active:scale-95",style:{bottom:"20px",right:"20px",background:"#FF4D2A"},"aria-label":"Abrir widget de llamada",children:l.jsx(xy,{size:24,className:"text-white"})}),t==="picking"&&l.jsxs("div",{className:"fixed z-[9999] flex items-center gap-3 rounded-full px-4 py-2 shadow-lg",style:{bottom:"20px",right:"20px",background:"rgba(30,30,30,0.92)"},children:[l.jsx("button",{onClick:a,className:"w-9 h-9 rounded-full flex items-center justify-center hover:bg-white/10 transition-colors","aria-label":"Cerrar",children:l.jsx(nc,{size:18,className:"text-white/70"})}),l.jsx("span",{className:"text-white text-sm font-medium select-none",children:"Talk to our AI"}),l.jsx("button",{onClick:()=>s("es"),className:"w-10 h-10 rounded-full text-xl leading-none hover:scale-110 transition-transform flex items-center justify-center","aria-label":"Español",children:"🇪🇸"}),l.jsx("button",{onClick:()=>s("en"),className:"w-10 h-10 rounded-full text-xl leading-none hover:scale-110 transition-transform flex items-center justify-center","aria-label":"English",children:"🇬🇧"})]}),t==="active"&&l.jsxs("div",{className:"fixed z-[9999] flex flex-col items-center gap-1.5",style:{bottom:"20px",right:"390px"},children:[l.jsx("button",{onClick:()=>s("es"),className:`w-10 h-10 rounded-full text-xl leading-none shadow-md border-2 transition-all flex items-center justify-center ${n==="es"?"border-[#FF4D2A] scale-110 bg-white":"border-transparent bg-white/80 opacity-70 hover:opacity-100"}`,"aria-label":"Español",children:"🇪🇸"}),l.jsx("button",{onClick:()=>s("en"),className:`w-10 h-10 rounded-full text-xl leading-none shadow-md border-2 transition-all flex items-center justify-center ${n==="en"?"border-[#FF4D2A] scale-110 bg-white":"border-transparent bg-white/80 opacity-70 hover:opacity-100"}`,"aria-label":"English",children:"🇬🇧"}),l.jsx("button",{onClick:a,className:"w-10 h-10 rounded-full flex items-center justify-center bg-white shadow-md border border-gray-200 hover:bg-gray-100 text-gray-500 transition-colors","aria-label":"Cerrar",children:l.jsx(nc,{size:18})})]})]})},jre=()=>{const[t,e]=I.useState(!1);I.useEffect(()=>{if(!localStorage.getItem("cookie-consent")){const r=setTimeout(()=>e(!0),1e3);return()=>clearTimeout(r)}},[]);const n=i=>{localStorage.setItem("cookie-consent",i),e(!1)};return l.jsx(Vl,{children:t&&l.jsx(me.div,{initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},transition:{type:"spring",damping:25,stiffness:300},className:"fixed bottom-0 left-0 right-0 z-[9997] px-4 pb-4",style:{fontFamily:"Quicksand, sans-serif"},children:l.jsxs("div",{className:"mx-auto max-w-4xl rounded-2xl px-6 py-4 shadow-2xl flex flex-col sm:flex-row items-center gap-4 sm:gap-6",style:{background:"#150835"},children:[l.jsxs("p",{className:"text-white/90 text-sm font-light flex-1 text-center sm:text-left",children:["We use cookies to improve your experience. By continuing, you agree to our use of cookies."," ",l.jsx(We,{to:"/privacy",className:"underline text-white hover:text-[#FF3478] transition-colors",children:"Learn more"})]}),l.jsxs("div",{className:"flex gap-3 shrink-0",children:[l.jsx("button",{onClick:()=>n("declined"),className:"px-5 py-2 rounded-full text-sm font-medium text-white/80 border border-white/30 hover:border-white/60 transition-colors",children:"Decline"}),l.jsx("button",{onClick:()=>n("accepted"),className:"px-5 py-2 rounded-full text-sm font-medium text-white transition-colors",style:{background:"#FF3478"},children:"Accept"})]})]})})})},Ore=new dH,Ure=()=>l.jsx(fH,{client:Ore,children:l.jsx(zV,{children:l.jsx(Uq,{children:l.jsxs($te,{children:[l.jsx(x6,{}),l.jsx(Y6,{}),l.jsx(kre,{}),l.jsx(Lre,{}),l.jsx(Fre,{}),l.jsxs(uW,{children:[l.jsx(jre,{}),l.jsxs(iW,{children:[l.jsx(Kt,{path:"/",element:l.jsx(Nne,{})}),l.jsx(Kt,{path:"/about",element:l.jsx(Gne,{})}),l.jsx(Kt,{path:"/platform",element:l.jsx(Jne,{})}),l.jsx(Kt,{path:"/applications",element:l.jsx(ew,{to:"/platform",replace:!0})}),l.jsx(Kt,{path:"/signal",element:l.jsx(uie,{})}),l.jsx(Kt,{path:"/solutions",element:l.jsx(nre,{})}),l.jsx(Kt,{path:"/partnerships",element:l.jsx(ew,{to:"/solutions",replace:!0})}),l.jsx(Kt,{path:"/partners",element:l.jsx(Tre,{})}),l.jsx(Kt,{path:"/the-signal/operational-blindness-crisis",element:l.jsx(mie,{})}),l.jsx(Kt,{path:"/the-signal/nps-lagging-indicator-churn",element:l.jsx(yie,{})}),l.jsx(Kt,{path:"/the-signal/automated-call-center-qa-framework",element:l.jsx(bie,{})}),l.jsx(Kt,{path:"/the-signal/ai-moderated-market-research-speed",element:l.jsx(Aie,{})}),l.jsx(Kt,{path:"/the-signal/automatic-deal-loss-attribution-ai",element:l.jsx(Eie,{})}),l.jsx(Kt,{path:"/the-signal/ai-moderated-qualitative-interviews",element:l.jsx(Nie,{})}),l.jsx(Kt,{path:"/the-signal/logic-adaptive-probing-ai-interviews",element:l.jsx(kie,{})}),l.jsx(Kt,{path:"/the-signal/ai-interviews-vs-nps-response-rates",element:l.jsx(Fie,{})}),l.jsx(Kt,{path:"/the-signal/scale-qualitative-insights-global-panel",element:l.jsx(Uie,{})}),l.jsx(Kt,{path:"/the-signal/data-privacy-ethics-ai-human-research",element:l.jsx(Vie,{})}),l.jsx(Kt,{path:"/the-signal/top-ai-call-center-analytics-platforms-2026",element:l.jsx(Gie,{})}),l.jsx(Kt,{path:"/the-signal/lexic-pulse-vs-gong-conversation-intelligence",element:l.jsx($ie,{})}),l.jsx(Kt,{path:"/the-signal/best-ai-tools-customer-interviews-2025",element:l.jsx(Kie,{})}),l.jsx(Kt,{path:"/the-signal/c-level-ai-study",element:l.jsx(ere,{})}),l.jsx(Kt,{path:"/blog/:slug",element:l.jsx(Pre,{})}),l.jsx(Kt,{path:"/report/:slug",element:l.jsx(ew,{to:"/the-signal/c-level-ai-study",replace:!0})}),l.jsx(Kt,{path:"/privacy",element:l.jsx(Rre,{})}),l.jsx(Kt,{path:"/terms",element:l.jsx(Ire,{})}),l.jsx(Kt,{path:"*",element:l.jsx(Nre,{})})]})]})]})})})});Dk(document.getElementById("root")).render(l.jsx(Ure,{}));